3 ms·
I think philosophically this article should clarify the semantics of the languages, what needs to be specified in the declarations. Then talk about the syntax i
by fsckboy 3y ago
I think philosophically this article should clarify the semantics of the languages, what needs to be specified in the declarations. Then talk about the syntax if there is any further need to. Languages are all about semantics; in principle there is no reason languages couldn't offer each user his own choice of syntax.
- AnimalMuppet 3y agoIf it was absolutely completely convertible to different syntaxes, then yes, choice of syntax would be awesome. But everything has to be accurately representable in every supported syntax, which is a high bar. I was going to protest about maintainability - if nobody can read your syntax, they can't maintain your code. But if they can just convert it to their syntax, then they can maintain it. Even better, certain things may be easier to represent in one syntax than in another. You could write each part in the syntax that works best for it, if that simplifies things, and then convert them into any of the other syntaxes. One thing that would be essential, though, is that the syntax A -> syntax B -> syntax A round trip gives you back the original code in syntax A (or better - but it can't be worse). If you get back, say, twice as much code when you do the round trip, then you can't convert back and forth for different people and still maintain a workable code base.