News for hackers. Stuff that matters.
Re:Organizations Using the D Language by randomNumber7 on Wednesday February 17, 2021 @03:19AM (#26163965)
If you can think like a C programmer, you will be able to write really fast programs in D.

D, C++ (and also C# and Java) are very similar languages. If you learn any of those, learning the others will be easy.

C++ is just the most complicated because of the accidental complexity of the language.

Re:Organizations Using the D Language by otabdeveloper4 on Wednesday February 17, 2021 @03:47AM (#26164167)
No, not at all.

C++ is much closer to something like OCaml than to C or Java.

The "complexity" is not accidental, and it only seems complex because people are not used to languages with static typing systems. C++ is not complex if you mastered something like the Haskell type system.

(C and Java aren't really statically typed; they rely on run-time typing for polymorphism.)

Re:Organizations Using the D Language by oblio on Wednesday February 17, 2021 @05:50AM (#26164997)
C++ is not complex? The C++ complexity is not accidental? C++ is like Haskell or OCaml?

Dude, C++ can still compile C code, right? And how are C++ templates anything like Haskell or OCaml? Aren't they just some fancy text-based code generator thing, at the end of the day?

I'm really curious about this as everything I've seen so far contradicts your perspective.

Or are you talking just about modern C++ (post C++ 11)? That doesn't work as C++ of all kinds is out there in the wild and you'll run into it, at least from external dependencies.

Re:Organizations Using the D Language by otabdeveloper4 on Wednesday February 17, 2021 @06:53AM (#26165384)
> C++ is not complex? The C++ complexity is not accidental? C++ is like Haskell or OCaml?

C++ doesn't compete with Java or Go, C++ competes in the "polymorphism via static typing" niche along with Haskell, Ocaml, etc.

If you look at what Haskell at al. need to do to get static polymorphism right then C++ doesn't look at all that complex or strange.

> Dude, C++ can still compile C code, right?

No, wrong.

> And how are C++ templates anything like Haskell or OCaml?

C++ templates are a purely functional Lisp-like DSL.

> Aren't they just some fancy text-based code generator thing, at the end of the day?

So is Haskell.

> I'm really curious about this as everything I've seen so far contradicts your perspective.

You just don't know C++. People think they do because they learned a bit of C back in college, but they don't.

> Or are you talking just about modern C++ (post C++ 11)?

C++11 was a decade ago; hardly "modern".

> That doesn't work as C++ of all kinds is out there in the wild and you'll run into it, at least from external dependencies.

There's lots of legacy crap out there in the wild, including legacy COBOL and legacy Haskell. I fail to see your point; "modern" C++ isn't some wild departure from the original idea of C++. Ever since STL it has been in a pretty specific and well-defined trajectory.

Re:Organizations Using the D Language by travv0 on Wednesday February 17, 2021 @10:00AM (#26166973)
> (C and Java aren't really statically typed; they rely on run-time typing for polymorphism.)

Um, what? Having type information available at runtime is orthogonal to whether or not a language is statically typed.

Re:Organizations Using the D Language by otabdeveloper4 on Wednesday February 17, 2021 @10:58AM (#26167834)
"Aren't really" means "cannot commit to 100 percent static typing all the way".