News for hackers. Stuff that matters.
Re:TIL: Tcl-inspired command language on top of D by mhh__ on Saturday May 15, 2021 @11:40PM (#27171010)
I'm not sold. Why do I want a scripting language to glue together that is designed to be good a glueing things together?

It's a common misconception that programming languages are either fast or expressive - D is both. The rub is probably that you need to know more about programming in the sense that you have to have good aesthetic taste but also a knowledge of what makes programs actually fast to achieve both.

And besides, what is a script? Code. If you're really only going to use a file once, then I guess do what ever you want but most "scripts" end up being programs.

Re:TIL: Tcl-inspired command language on top of D by na85 on Sunday May 16, 2021 @03:33AM (#27171922)
>Why do I want a scripting language to glue together that is designed to be good a glueing things together?

A good example might be calling legacy libraries like BLAS and LAPACK. These are battle-tested libraries that represent probably hundreds of millions of dollars of developer time, but Fortran is annoying for IO-heavy tasks (at least in my opinion).

I like that I can spin up a scripting language like python and call into LAPACK for performance and correctness, but still have modern and ergonomic networking or what have you.

Re:TIL: Tcl-inspired command language on top of D by mhh__ on Sunday May 16, 2021 @08:32AM (#27173234)
Again, D is designed to make calling into C code easy within the same program you were working on. The idea that you can't have a language that is both expressive and fast is just Stockholm syndrome from C++ being unergonomic.

Check it out on the website, you can write an RPN calculator in D in less lines than a Haskell implementation last time I checked, all while checked to be pure by the compiler.

Not only would a scripting language be slower because the compiler would be a hack without access to LTO and not have a proper type system etc., It would he a complete waste of time.

Re:TIL: Tcl-inspired command language on top of D by cleberz on Sunday May 16, 2021 @12:23AM (#27171210)
You are entitled to your opinion, sir. Have a nice day.