4 ms·
This is a great way to to write very unaesthetic Python.
by tmarice 3y ago
This is a great way to to write very unaesthetic Python.
- ansgri 3y agoIt's almost like with Python you have a spectrum of aesthetics and maintainability. The "most aesthetic" (concise and readable-as-plain-English) code involves a lot of magic (metaclasses, dynamic dispatch etc.), so it's better left to foundational libraries with extensive testing by thousands of developers. Except they probably have a ton of asserts and type hints under the hood, so only the interface is "aesthetic". And if you just want to write a maintainable code, it's less work to just stick to simpler and uglier constructs with explicit types.
- Yoric 3y agoYou are right, that feels like a pretty good description of the tradeoffs when writing Python. While I'm not a big fan of Go, I kinda understand why Go doesn't allow writing "aesthetic" libraries, because the cost in terms of behind-the-scenes maintenance is enormous.