Hacker News new | past | comments | ask | show | jobs | submit login

> So what is out there for me, if not C++ or Rust?

Ada.

I write C++ professionally and used Rust for about a year, but don't use it anymore. In many ways, Ada feels like a much simpler implementation of the C++ feature set. The language lets you focus on intent, while still having a lot of control.

Yes, Ada's still alive and kicking, it has a package manager, documentation generator, parsing/semantic analysis library, and a language server. There's been a *massive* modernization push over the last year of the ecosystem. If you download Alire, you can install the FSF GNAT toolchain and get set up super easily. Some of the older parts of the GNAT tools are showing there age, but they're already there and the ecosystem is significantly better than you'd expect.

Regarding multi-platform support, I routinely swap between Linux and Windows testing things out.

> A lack of default arguments, a lack of basic arity overloading, a lack of variadic generics,

Ada features are opt-in, and you use what you want. It has default arguments, arity overloading, and destructors when needed (with Controlled types). Interfacing with C is super easy, as is bringing in compiler intrinsics. Generics (compile-time templates) are a little weird because you can instantiate an entire package (namespace) with types/functions. They can also take other packages as parameters or you can just write a singular generic function. However, it's missing compile-time ops, variadic generics, and move semantics.

- https://learn.adacore.com/

- https://alire.ada.dev/

- https://pyjarrett.github.io/programming-with-ada/comparison....

- https://www.adaic.org/advantages/ada-202x/




It became clear that the author isn't willing to consider anything that isn't 100% perfect in every way anymore. One tool needs some work - your whole language is out.

Ada is on my list of languages to learn something about (more than the 12 languages in 10 weeks class I took back when I got my degree which is the only time I touched it). It has some interesting features (particularly the SPARK variant)


But we do. The value I get from this kind of articles, and I did read the article, is actually in the comments here.

Adding ADA to this language feature comparison is interesting to me.


BTW, there is no language named ADA.


We should cut people some slack about this, especially considering that the language itself is case insensitive :P

I'm not sure what actually triggers the confusion about this, but it is Ada, not ADA. It's not an acronym, I'm curious about the origin of the incorrect all caps version, but it seems like there's a forgotten historical reason for this.


Ada came out of the DOD so assuming it's an all-caps acronym makes a lot of sense. ;)


Jean Ichbiah might have bristled at such an assertion. (He called his language "Green".) But, renamed, Ada was heavily promoted by the DoD.


> It became clear that the author isn't willing to consider anything that isn't 100% perfect in every way anymore.

Not "perfect", "their way". Things like variadic generics or arity overloading are not about perfection (there are excellent reasons not to have them).

And it's fine to want things and not be willing to compromise — which is what OP did, incidentally.

But it has nothing to do with "perfection", and your take is very much unhelpful and inflamatory.


(Veering a bit off-topic, forgive me.)

Is there any non-proprietary Ada/SPARK implementation? I've heard some good things about Ada/SPARK, but DDG hasn't been much help in finding out if there's any non-proprietary implementation of SPARK of decent quality.


> Is there any non-proprietary Ada/SPARK implementation?

Yes, it's now available as part of GNAT. The integration in GNAT Studio is good and lets you prove a single line or entire file in the IDE.

I mostly write Ada for my projects and have only dabbled in SPARK. It's super interesting, but also ridiculously hard. I don't have any formal training in this, but to me, I found it at least as on par with C++ template metaprogramming in terms of difficulty.


Is there an easy way to get up and running with SPARK on ubuntu using just "apt install" from official package repositories?


GNAT is part of GCC, I'd look in your package manager for "Ada" and/or GCC.

I'd recommend asking in https://gitter.im/ada-lang/Lobby


I don't think so, last I checked you have to download the graphical installer from AdaCore. I'm not sure why it's this way.

I've never had any trouble with the installer, at least.


Alire (https://alire.ada.dev/) can do the toolchain install now. It's pretty much like cargo, and can also be used to select from multiple toolchain versions.


Ah, thanks. I guess this is also available with the command line tools? (I'm thinking for CI purposes.)


Yes, a lot of GNAT studio behavior is actually written as command line tools that get called specifically so you can use them outside of the editor.

The dialogs for builds/proofs even show the exact command line that's going to be used, and updates as you configure it in the editor dialog. It's a great way to learn how the GNAT tools actually work.


I wrote a toy Ada compiler for my master's thesis. It's a very fun language. I miss using it. I was attracted to Python because of exception handling which I learned from Ada.


Does Ada compile for mobile platforms (Android/iOS/etc) ? Does Ada support lambdas ? (can't find this)


See https://blog.adacore.com/android-application-with-ada-and-we...

> Does Ada support lambdas ?

No, but you can declare functions inside functions and also use function pointers. When I started using Ada I thought this was a huge issue, but I haven't run into problems with it in practice.


Ok, this is WASM and not native code. Pity. One of my considerations to learn a new language is to look whether the language has native mobile support.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: