3 ms·
All points are subjective and many people would claim this is false for all bullet points. > [x] nicely interfaces with c Unfortunately, that's only if you ca
by brabel 3y ago
All points are subjective and many people would claim this is false for all bullet points.
> [x] nicely interfaces with c
Unfortunately, that's only if you can avoid D Strings. Otherwise, you'll need to use toStringZ which makes copies of each string to ensure they have a null terminator.
> [x] the language being small enough that all basics can be grasped in a day
I'm still learning new stuff after several weeks using D. The basics are indeed simple, but there's A LOT of stuff in D.
> [x] the language being complete that it will remain the same in 10 years (the 1.0 release was 23 years ago)
D is evolving slowly but evolving. With the new ideas about making parts of the stdlib GC-free and the borrowing concepts being slowly introduced, the language is changing... people are making a lot of pressure to add new "cool features" from other languages, like the recently accepted string interpolation proposal. It will not be the same in 10 years, but it's true that most of it will be unchanged.
> [x] while at the same time being memory safe.
D is not memory safe by default, you need to use `@safe` which is annoying because currently , a lot of the stdlib is not `@safe` (but it could be!). It's true it's much, much harder to mess up in D than in C, but compared to Rust, I think it's quite unsafe (which is why it's introducing borrowing, to catch more unsafety bugs).
- paulddraper 3y agoC strings are just...bad, bad, bad. C++, D, Zig, Go, Rust have ALL decided to not use C strings as their primary string type. But converting is as simple as a function call. (And literals are null terminated) What features of D are deep? A feature like string interpolation is modest syntax sugar. The kind of change that takes 40 seconds to understand. > Rust Bwhahahaha if D is not simple or simple, IDK what to call Rust.
- bachmeier 3y ago> Unfortunately, that's only if you can avoid D Strings. Otherwise, you'll need to use toStringZ which makes copies of each string to ensure they have a null terminator. There's nothing that would prevent them from using C strings. Since they want a safe language, I doubt this would be a reason they don't want to use D. > I'm still learning new stuff after several weeks using D. The basics are indeed simple, but there's A LOT of stuff in D. This is a bad question, because there really is no language in 2024 that you can learn everything in a day. > D is evolving slowly but evolving. Again, a bad question. Even C is evolving. The main complaint about D is that it isn't evolving fast enough, with too much emphasis on avoiding breaking changes. If they implement editions, it actually would work as OP wants, because code that compiles today will compile forever in the future.