3 ms·
That would be a good start as the current syntax is absurd.
by devit 2y ago
That 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.