3 ms·
"band-aids like the moratorium become necessary solutions, alleviating the symptoms of a more fundamental design flaw: syntax and semantics which require human
by digitallogic 16y ago
"band-aids like the moratorium become necessary solutions, alleviating the symptoms of a more fundamental design flaw: syntax and semantics which require human implementation instead being portable from one implementation to another."
Would it be easier to for alternative implementations (non-CPython ala Jython, IronPython, etc) to keep up if the syntax was portable between them? Yes, of course. Is this a "Design Flaw"? Not in any way.
Portable syntax between implementations is not a primary goal of Python (the language) so I don't see any merits for criticizing it for not taking a feature never previously desired (most of the alternative runtimes are relatively young) into account in the underlying design.
If you need to alter/extend the syntax to python at some point I'd advising looking at the python magazine article on implementing DSL's w/pyparsing noted here:
http://pyparsing.wikispaces.com/Publications http://pyparsing.wikispaces.com/Publications
If are in frequent need to alter/extend the syntax of the language you are using, and it is a non-trivial task, then you are using the wrong language.
- andreyf 16y agoI can agree to this. I think the entire struggle I've gone through with Python is realizing at it isn't the language PG promised me :-P