4 ms·
> why are languages so damn stuck on syntax. > Why can't it be a one line change for person A to > have () and person B to have [] (and person C have
by danneu 14y ago
> why are languages so damn stuck on syntax.
> Why can't it be a one line change for person A to
> have () and person B to have [] (and person C have <>,
> or {}), and then have tools which automatically
> translate between them.
Aren't languages stuck on syntax because syntax is what's standard? It's the terms in which a language is defined and it's what we must agree upon before we can even start building our own abstractions or swappable gylphs for the parts we don't like.
Fortunately you can use technology to compile your personalized syntax to the standard syntax.
We already do that. In fact, entire communities are built around custom syntax layers.
I imagine someone would only map "()" to "[]" because "()" is either unfamiliar or harder to type.
The superior solution is to learn "()" so that it becomes familiar or map "[]" to "()" respectively.
In both solutions you have an end result that does not distance the source code in the editor from the source code you're pushing to your repository, and that's the kind of thing we seem to optimize for as developers.
Obviously I have no idea what you actually had in mind, this is just what came to mind when I read that bit.