4 ms·
I'll give you it's overly verbose even though quite a bit of it was justifiable. The theory of Ada's designers was that people read software more than write it.
by nickpsecurity 10y ago
I'll give you it's overly verbose even though quite a bit of it was justifiable. The theory of Ada's designers was that people read software more than write it. So, the syntax should be designed to facilitate catching errors in maintenance mode, during extensions, or during integrations. It's done phenomenal at that per industrial, case studies despite having been invented in the 80's when lots of language decisions were still being debated.
EDIT: I keep thinking a different language that acts as a front end w/ a better syntax might be a good idea. It outputs Ada that integrates with the tooling ecosystem. Also, a seemless FFI for C libraries like Julia's.
- bluejekyll 10y ago> I keep thinking a different language that acts as a front end w/ a better syntax might be a good idea... Also, a seemless FFI for C libraries like Julia's. You mean Rust I think ;)
- nickpsecurity 10y agoPeople have had a hard time learning Rust. I also get gripes about its inconsistency in language syntax. The FFI I hear is good. It certainly doesn't output to SPARK or a C subset designed for easy, static analysis. So, Rust ain't the Ada makeover Im thinking about. It's also in a stability-oriented freeze of existing design right now. So, the makeover will need to be a different language.
- eternalban 10y agoThat type system is pretty sophisticated. You could probably slap a FP front-end ala Haskell but that would hardly make it more accessible. Might as well just bite the bullet and learn the language.
- bluejekyll 10y ago> People have had a hard time learning Rust. I won't lie to you. It took me longer to produce good code in Rust than almost any other language I've recently learned. But it's worth it; it's quite simply amazing that it is capable of guaranteeing what it does, with nearly zero overhead. Also, I'd say in many ways it's simpler than C, because it has no undefined behavior; I don't need to concern myself with any of the nuances that I had to learn in C. I highly encourage you to give it two weeks, that's what it took me to become hooked.
- socmag 10y agoI totally agree that code should be written to be read. It certainly wouldn't hurt if people simply used a more literate programming style no matter what language they choose Far too many people think code as below is acceptable. This is C obviously, but pretty much equal horrors around in every language. This isn't 1994 and the compiler really doesn't care how long your variable names are, plus EatWhite() is pretty damn fast. const int to_pn = base_n ^ label_n; const int from_p = _array[to_pn].check; const int base_p = _array[from_p].base (); const bool flag = _consult (base_n, base_p, _ninfo[from_n].child, _ninfo[from_p].child); uchar child[256]; uchar* const first = &child[0]; uchar* const last = flag ? _set_child (first, base_n, _ninfo[from_n].child, label_n) : _set_child (first, base_p, _ninfo
- wott 10y ago> This is C obviously No, that's C++.
- __david__ 10y agoYou can't say that definitively based on that code. It could very well be C code. There's nothing there syntactically that a straight C compiler would barf on.
- socmag 10y agoAbsolutely correct.
- smitherfield 10y agoIt could be C if `_array` is an array of struct { int check; int (*base)(void); };
- socmag 10y agoIt is!
- 10y ago