Hacker News new | ask | show | jobs
by mhh__ 1864 days ago
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.

2 comments

>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.

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.

You are entitled to your opinion, sir. Have a nice day.