4 ms·
That code, starting on line 41, has convinced me to continue avoiding Python. Python has went from a clear concise language with one right way to do things, to
by datalopers 4y ago
That code, starting on line 41, has convinced me to continue avoiding Python. Python has went from a clear concise language with one right way to do things, to outpacing C++ when it comes to adding esoteric language features.
- zem 4y agothat code is pattern matching on an ast node; the complexity is from the data structure involved, not the language. there is no more concise way to match a specific node and get at the relevant fields, just various different forms of verbose code.
- ac130kz 4y agoThat code has nothing to do with conciseness, he could've extracted the arguments in separate variables
- jraph 4y agoIf anything, this matching on an AST is very readable and elegant, and that just convinced me that the syntax of Python seems really good to write a parser.
- sireat 4y agothat AST parsing code looks like something written in Scala ... seems like Scala is moving to more Python like and Python is moving to add some features from Scala.
- Waterluvian 4y agoI’m actually genuinely curious what alternative you might present from any language. I always thought that was relatively concise for such a complex data structure.
- fny 4y agoThey're complaining about types, :=, and match.