4 ms·
I like Ada a lot, and I've been known to push it, only half-way kidding, on many occasions. However, there are a few things that make the language somewhat ann
by joewing 10y ago
I like Ada a lot, and I've been known to push it, only half-way kidding, on many occasions. However, there are a few things that make the language somewhat annoying to use, especially for someone who is accustomed other up-to-date languages (Python, C++11, Java, Scala, etc.). The obvious one is probably the verbose syntax, but really I don't mind it too terribly much (writing "function bah return integer is begin .... end blah" does get a little old though). Here's a list:
* No type inference. The lack of type inference means that I end up typing the names of types all over the place (or renaming them to be short, which doesn't really help the reader much).
* No lambdas or closures. I really want to be able use higher-order functions, but Ada makes that difficult.
* Extremely verbose generics. Ada has amazing support for generics, but there's so much overhead to use them (syntacticly) that I usually avoid them.
* Strange dispatch syntax. I personally like it, but it is strange to those more accustomed to C++ or Java, where methods are part of the class. In Ada, methods are declared as taking a "tagged" type as a parameter. Related to this, I really think Ada should support multiple dispatch (if you're going to have the strange syntax, why not?).
- Keyframe 10y agoActually, everything you've listed seems like a good fit for a C programmer (me) to give Ada a serious spin. Maybe not for a C++ programmer. In the meantime, I've learned about the existence of "-fdump-ada-spec" for both gcc and g++. Apparently, g++ driver is preferred, even for C code. How cool is that? Automatic thin wrappers for your existing code with nothing more than a 'g++ -c -fdump-ada-spec -C super_awesome_code.h'. I've just tried it on a somewhat large-ish codebase which has a single .h as an entry point and it created a bunch of .ads thin wrappers with only two unsupported macros (one doesn't matter and the other is for dllimport/export shit). If this works, it might be an easy ticket into Ada adventures for a C programmer.
- fghgfdfg 10y agoI'm pretty familiar with most of these issues, except for the one about verbose generics. What do you find so verbose about them? To my thinking they aren't much more verbose than C++ templates. They end up being a short little section above the place they are used. However I don't really feel like it's a verbose language in the first place (even if there are a few more characters around) so perhaps I'm just missing something entirely.
- SeanDav 10y agoA lot of this looks solvable with a good editor. Think about how much boiler plate java code is generated by decent editors these days.