Hacker News new | ask | show | jobs
by moltonel3x 1703 days ago
D and Ada both use a GC in many contexts, and are not half as interesting in their GC-less contexts. They both initially only had a proprietary compiler, which durably harmed adoption. They both seem to cater to fewer domains than C/C++/Rust. Today Ada is only used in high-stakes industry, and D doesn't seem to have any claim to fame. It's a pity that neither succeeded in their time, but there's no good reason to use either of them today.

Zig is very promissing, but is just too new.

You failed to mention C++. It's well loved (and hated), has many pros and cons compared to C, and is used for kernel development (just not Linux).

It's silly to think that the only explanation for Rust success is community lobbying. Rust has many concrete advantages, like being safer than C/C++/D/Zig, being fully GC-free and suitable for kernel and embedded development, having actually gained significant traction, having great tooling/docs/ecosystem... And generally being a language that people enjoy. Rust isn't the end-game of kernel programming, but it isn't just "yet another better C".

2 comments

Ada doesn't use a GC!

The only reason it isn't highly adopted was the high cost of its compilers, only SGI and Sun cared to have compilers on UNIX back in the day, and Microsoft, IBM and Apple rather doubled down on C++.

Sorry, bad mischaracterisation on my part, annoyingly it's too late to edit my post.

Looking at the Ada docs again, it considers manual deallocation an unsafe operation and suggests avoiding it altogether (IIUC, by restricting yourself to the stack or by leaking to the heap). That seems like a huge restriction, making the "Ada is safer than Rust" claims rather academic.

Indeed, when using Ada83 and ignoring all the later language standards.

You should compare with Ada 2012 with finalization types and SPARK.

Hardly any different than using unsafe on Rust's standard library, wrapped with safer constructs.

>D and Ada both use a GC in many contexts

Can you point me to a (non-jvm) Ada implementation with a GC?