4 ms·
depends how quickly the "conversions" or "expressions" of syntax can be altered, and how each of us likes to work. when we load code into an editor, we get col
by fsckboy 1y ago
depends how quickly the "conversions" or "expressions" of syntax can be altered, and how each of us likes to work.
when we load code into an editor, we get colored syntax highlighting that's done on the fly according to rules which have a syntax of their own. So, perhaps it could be done at that level.
I would prefer if I ran "make syntax" on my repository, and you ran "make syntax" on yours, and we both ran "git semantics" to update the hub. The reason I prefer that is then I could use cli tools I'm used to, like grep, and only have to keep in mind "my syntax" which I would use for all the languages I code in. Then I could write my own helper tools... or, I could also write helper tools that worked on the semantic version and would not need complex parsers of braces, quotes, backslashes, etc.
these ideas are not orginal to me, the language CGOL https://en.wikipedia.org/wiki/CGOL https://en.wikipedia.org/wiki/CGOL was lisp that looked C or algol style. The language CLU https://en.wikipedia.org/wiki/CLU_(programming_language) https://en.wikipedia.org/wiki/CLU_(programming_language) was OOP that was implemented all as calls to member functions, but then there was a layer of syntactic sugar on the surface so you could write x+y and it would turn into .add(x,y), they had identical semantics.
- K0balt 1y agoIt’s a very interesting idea to separate syntax from language mechanics. In a way, that’s what all programming languages do, with bytecode or machine instructions under the hood, but the idea of segregating syntax from function seems distinct in an intriguing way. I wonder how much, exactly, of the comparative benefits of various languages stem from their syntax rather than the way it is compiled?