3 ms·
I maintain conviction in my position that if AdaCore and/or other champions of Ada were to undertake a serious project (i.e. not an April Fools' Day joke blog p
by cxr 2y ago
I maintain conviction in my position that if AdaCore and/or other champions of Ada were to undertake a serious project (i.e. not an April Fools' Day joke blog post[1]) to ship a compiler that accepts a curly-braced dialect of the language[2][3], then there would be at least twice as many new, earnest users of the vulgar "skinned" form as there are programmers today using the existing language, and that this tripling would happen virtually overnight.
I'm not even talking about major revisions to the grammar. I'm saying fork the lexer to accept a different set of terminals, and leave the nonterminals alone.
Is this stupid and unreasonable and should programmers just get over themselves and use a language on the strength of its merits instead of being turned off by surface-level stuff? Yeah, it is, and yeah, they should. But people are fickle.
1. <https://blog.adacore.com/a-modern-syntax-for-ada https://blog.adacore.com/a-modern-syntax-for-ada>
2. <https://news.ycombinator.com/item?id=24367358 https://news.ycombinator.com/item?id=24367358>
3. <https://news.ycombinator.com/item?id=35217839 https://news.ycombinator.com/item?id=35217839>
- juped 2y agoI'm also desperate to stop Rust by any means, but I don't think you're correct; I think the sticking point for language adoption is the presence or absence of a big npm clone.
- steveklabnik 2y agoAlire has existed for a long time now; the oldest release on GitHub is 0.4 from 2018.
- coliveira 2y agoNothing prevents anyone from creating a preprocessor that maps { to BEGIN and } to END.
- cxr 2y agoNothing prevents anyone from trying to eat spaghetti with a spoon. (Or from modifying the lexer to accept a different set of terminals, even.) > Kramer: "Yeah, well, I could do it. I don't wanna do it." > Jerry: "We didn't bet if you wanted to do it. We bet on if it would be done." > Kramer: "And― and it could be done." > Jerry: "Well of course it COULD be done. Anything COULD be done. But it's only is done if it's done! Show me the levels! The bet is the levels!" > Kramer: "I don't want the levels!" > Jerry: "That's the bet!" <https://www.youtube.com/watch?v=4CxIVvLaGKI https://www.youtube.com/watch?v=4CxIVvLaGKI>
- SSLy 2y agoSpaghetti is eaten with spoon and fork…
- windward 2y agoImpelementing the grammar is the easiest 0.1% of programming language dissemination. Adding explicit non-const to g++ would be so, so easy. But pointless.
- timbit42 2y agoDerivatives of Pascal such as Modula-2, Oberon, Lua, and Ada do not require BEGIN on IF, FOR, WHILE, LOOP or CASE statements, making the syntax much cleaner.
- rramadass 2y agoNot related to Ada, but Dafny is a "Verification aware programming Language" where both Formal Specification and Verification are combined together in the same source language - https://dafny.org https://dafny.org It uses curly braces and can generate code for a number of different languages at the backend (eg. Java, C#, Go, Python, Javascript, C++). I haven't played with it yet but just from reading the documentation i really like this approach since you need learn only one language/toolchain for both formal specification/verification and implementation. But by giving one the flexibility to generate code to various mainstream languages you can slowly add verified code module by module to existing codebases.
- devit 2y agoThat would be a good start as the current syntax is absurd.
- marssaxman 2y agoIt's not absurd, it's just out of fashion. Ada syntax comes from the same heritage as Pascal, which was as popular as C during the 80s (and sometimes even more so).
- mbonnet 2y agoPascal died for several very good reasons.
- marssaxman 2y agoThat may well be, but syntax was not one of them. Someone who came into programming more recently and has only used curly-brace languages might not immediately understand what they are looking at, but that doesn't make it absurd - it's just different.
- musicale 2y agoPascal object code with runtime range checks could be slower than C object code without any such checks. Pascal strings typically were either statically bounded or included bounds information, while C strings typically did not. Unfortunately C's lack of bounds checking made it very easy to create buffer overflows, which turned out to be a huge problem. Ada doubled down on memory safety, which turned out to be a very good idea, especially if it can be combined with concurrency safety, formal checking (as with SPARK), etc. Fortunately clang/llvm seem to be making some progress on memory safety; hopefully features like -fbounds-safety [1] will eventually bring C (and maybe C++) solidly into the 1980s. [1] https://clang.llvm.org/docs/BoundsSafetyAdoptionGuide.html https://clang.llvm.org/docs/BoundsSafetyAdoptionGuide.html
- timbit42 2y agoDerivatives of Pascal such as Modula-2, Oberon, Lua, and Ada do not require BEGIN on IF, FOR, WHILE, LOOP or CASE statements, making the syntax cleaner and conciser than Pascal.
- shipp02 2y agoYou are right but the vhdl-like syntax is quite nice. It does some surprisingly modern things.
- NavinF 2y ago"is begin" and "end;" are the opposite of nice/modern