by GhosT078 · 7mo ago · 0 comments
This was proposed, as a joke, some years ago: https://www.adacore.com/blog/a-modern-syntax-for-ada
This is an old but good article on the topic: https://www.embedded.com/expressive-vs-permissive-languages-... Note that SPARK has changed significantly since this was written.
Nevertheless in is possible to define a complete 1 to 1 mapping of all Ada syntactic tokens to a different set of tokens.
The resulting language will have exactly the same abstract syntax as Ada, so it is definitely exactly the same language, only with a different appearance.
For a seasoned Ada programmer, changing the appearance of the language may be repugnant, but for a newbie there may be no difference between two alternative sets of tokens, especially when the programmers are not native English speakers, so they do not feel any particular loyalty to words like "begin" and "loop", so they may not feel any advantage of using them instead of using some kind of brackets that would replace them.
This is why much more bracket pairs are needed in a programming language than the 3 pairs provided by ASCII.
Ada uses many pairs of brackets, but most of them are implemented with keywords, for instance if => end if, loop => end loop, and so on.
These long keyword-based brackets can be replaced with various Unicode bracket pairs that are graphically distinct.
Such brackets, for instance angle brackets instead of "if"/"end if", take much less space and they are also much more salient than keywords, which for me improves a lot the readability of the text.
Even if you do not know before that how the brackets are assigned, by reading the text you can discover very quickly the correspondence, because you can recognize what kind of structure is started by a certain kind of bracket, and then you know that when you will see a closing bracket of the same shape that is the end of the structure.