3 ms·
The literally verbose syntax contributes to its unpopularity as well. It is extremely hard to skim/read and comprehend prose-like Ada code.
by zerr 2y ago
The literally verbose syntax contributes to its unpopularity as well. It is extremely hard to skim/read and comprehend prose-like Ada code.
- shakna 2y agoWouldn't Rust's symbol heavy syntax contribute the same?
- swiftcoder 2y agoI think that since a significant portion of Rust developers come from a C++ background, and C++ uses basically the same set of symbols, it's not a huge barrier to adoption
- shakna 2y agoRust actually has a bunch of oddities, to the point they test them [0]. [0] https://github.com/rust-lang/rust/blob/master/tests/ui/weird-exprs.rs https://github.com/rust-lang/rust/blob/master/tests/ui/weird...
- swiftcoder 2y agoThere's really only one sigil in there that isn't in C++ (the ' single-quote to name lifetimes and labels). And it's missing several ambiguities that plague older C++ grammars (i.e. is >> a greater than, or closing two template expressions?)
- CRConrad 2y ago> (i.e. is >> a greater than, or closing two template expressions?) I thought it was a pointer-dereference signifier(, or maybe an object-string-stream thingy)? If you mean C++, that is.
- crabbone 2y agoI like Ada, but I tend to agree. "End Something_Somethig_Something" is really a mouthful (compared to "}"). And programmers are superficial like that. Ada wouldn't be the first decent language being dismissed for inconsequential aspects like this one.
- wffurr 2y agoContext free curly braces in deeply nested code make me crazy. Labels to match up with the open symbol would be super helpful. My company’s style guide requires them on closing braces for namespaces.
- Lucretia9 2y agoPretty sure Java in vscode and android studio places block names after }'s because it's hard to read otherwise.
- Dylan16807 2y agoIf you can't see the other end of a curly brace inside a function, I'm pretty tempted to say you're doing too much in one spot.
- pjerem 2y agoIn real life you’ll have to deal mostly with code you haven’t wrote yourself.
- adrian_b 2y agoExtracting sequences of statements into a function sometimes improves readability, when those sequences do together some recognizable operation, but other times such an extraction worsens a lot the readability, because now you need to also open other pages to see what the program really does, when the statements in a sequence are not really related. Even in programs optimally written for readability it is frequent to have iterations or selection statements much bigger than a page, especially where the coding rules enforce a small length for program lines, e.g. 80 characters. In languages that follow Algol 60, like Pascal, C, C++ and so on, which have a single kind of statement brackets, it is frequently needed to add comments on the final braces or "end", to avoid confusions when reading the program. This is much more cumbersome than in the languages that follow Algol 68, e.g. Ada and bash, where there are several distinct pairs of statement brackets.
- uticus 2y agoPhilosophically this is a fair point but practically it is not. Eventually any programmer will start relying more and more on tools to help with skim/read/comprehend code bases, no matter the language. There's a reason that every text editor and IDE used for programming includes helpers to find subroutine calls, jump to matching symbol (curly braces, closing parenthesis, end statement, or tab-depth indicator), etc, etc. No language is so "easy to skim/read and comprehend" that you'd be happy with a realistically significant code base and only the navigation keys on your keyboard. There's a very fine line between nice language syntax and ease of use via tools you use to interact with the language (with APL-influenced languages being the only exception I can think of, but even there I've heard of programmers having physical key map symbols overlaid on keyboards).
- typ 2y agoI got used to it after writing a lot of complex SQL. I even developed a preference for uppercase keywords.
- ajdude 2y agoFor me it's the other way around, I can skim a program written in Ada and figure out what it's doing almost the immediately because it is highly structured and enforces correctness with no ambiguity through its syntax. I can't really do the same for rust which tends to lend itself into a more confusing format.
- com2kid 2y agoIt was considered verbose years ago but now days it is IMHO better than messy C++ templates or Rust syntax.
- pyjarrett 2y agoAbout two years ago, I was able to dive into the Ada reference manual formatter which has initial commit of March 2000 and is about 45k lines of code, and add MDX output pretty easily. Other languages focus on terseness and expressiveness. Ada expresses a bunch of constraints directly and forces you to do things in organized ways (e.g. use namespaces appropriately).