Hacker News new | ask | show | jobs
by adrian_b 60 days ago
Because that is a joke, it proposes replacements only for a small set of Ada tokens and it is not clear how the proposal can be cleanly extended to the full set of Ada tokens.

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.

1 comments

I think there is a significant difference between choosing to use words (from some language) versus using brackets like {}, () and []. With nested brackets there are often debates over placement and it is usually less clear what scope is being ended by the closing bracket.
Indeed, the fact that is not clear what scope is being ended by the closing bracket is very serious.

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.