News for hackers. Stuff that matters.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by objektif on Saturday June 15, 2019 @09:25PM (#20193253)
How do you like D btw? Is it worth learning for a c++ programmer? I find the syntax very appealing.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by trishume on Saturday June 15, 2019 @09:30PM (#20193268)
Fun fact the person you're replying to is the creator of D, I'm pretty sure he likes it. I've personally played around with D a bit and written maybe 1kloc in it and I like it.

It doesn't have good pattern matching or the borrow checker, but it does have much better metaprogramming than Rust. I think a lot of the metaprogramming used in the Python project could also be done basically as easily in D, which is a big accomplishment.

Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by WalterBright on Sunday June 16, 2019 @01:50AM (#20194039)
D has many characteristics of lifetime checking in that it can track lifetimes across function calls and issue errors for incorrect usage. I've been looking into increasing its reach, and it looks promising.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by mhh__ on Saturday June 15, 2019 @09:48PM (#20193338)
Walter Bright is (along with Andrei Alexandrescu - which should be a good enough reason if you like c++) the BDFL of D.

D won't get you hired (probably), but D is designed with hindsight from a C++ compiler writer and a C++ template wizard: It shows, D is objectively better than C++ is many ways. It's worth checking out, at the very least (It's also not hard to learn, so I say go for it)

An example of the power of D: The Pegged library for D can generate a parser, D code which gets compiled, directly from a grammar specification in a text file [inside a D program, e.g. mixin(Grammar("Your Grammar Here"))]

Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by WalterBright on Sunday June 16, 2019 @01:46AM (#20194031)
> D won't get you hired (probably)

On the contrary. Many members of the D community have managed to leverage their D expertise into well-paying jobs. Many industrial D users recruit from the D community.

Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by mhh__ on Sunday June 16, 2019 @05:10AM (#20194617)
Not me though!

I was aware of that but I meant in comparison to (say) Java or JavaScript etc.

Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by WalterBright on Tuesday June 18, 2019 @04:00PM (#20217741)
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by objektif on Thursday June 20, 2019 @08:37PM (#20238841)
Such a good guy creates a language and finds people job postings for that language. Jokes aside didnt know you were behind D. Thanks for your contribution. I will give it a shot.
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by p0nce on Sunday June 16, 2019 @08:16AM (#20195108)
> Is it worth learning for a c++ programmer?

I was a former C++ full-time programmer (4 different jobs in high performance teams, high maintenance etc) and now I'm a D full-time programmer for 4 years.

It's easy to underestimate the difference, but to me _as a user_ those languages are night and day as an experience.

D is learnable, in the sense that your learning will have some sort of ending at one point. D is surprisingly stable too, the front-end doesn't change too much and all 3 compiler share the front-end. And it's somehow forgiving. So the whole experience is tilted towards what you do with it: you feel like "programming", not "programming in C++".

C++ has a few things going for it: it has some sort of mathematical completeness, you can find jobs maintaining C++ codebases for your retirement, and it has an aura of legitimacy. But overall I fear you would live in a much more complicated world, for reduced productivity.

Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by lelf on Sunday June 16, 2019 @06:00AM (#20194759)
I find compilation times very appealing.

D compiler can compile itself in under 5s (+ 10s for stdlib).

Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by vfclists on Sunday June 16, 2019 @03:09PM (#20197290)
From make clean? On what CPU?
Re:Comparing the Same Project in Rust, Haskell, C++, Python,... by lelf on Sunday June 16, 2019 @03:39PM (#20197462)
Yes. Zero to working compiler on vanilla MacBook Pro.