3 ms·
I don't need everyone else in my shop making horrible sloppy messes at an unnecessarily high level of abstraction using macros. I'll be picking up after their c
by pekk 12y ago
I don't need everyone else in my shop making horrible sloppy messes at an unnecessarily high level of abstraction using macros. I'll be picking up after their cute shit at the end of the month, under emergency conditions. There's currently no problem with them recompiling Python to make weird one-off syntax because that's clearly crossing a line. I could add my own syntax and recompile, but I legitimately don't need or want to. No, I don't need a general runtime macro capability in Python. It's not a good idea and it doesn't buy anything I actually need.
- agentultra 12y agoSo... don't use it? Nobody is suggesting we add macros to Python. Macros do not make code unmaintainable by their virtue alone any more than pointers, references, or any other language feature. I suggest you look into code review and use some code checking tools like style checkers, linters, and test coverage report generators.
- orbifold 12y agoTake OCaml for comparison: It has a more or less reasonable way of extending the language with an extensible parser camlp4 that ultimately yields a fixed AST. No one would get the idea to use it just for fun, or one-shot abstractions, but it is integrated into the toolchain well enough that you can reliably distribute libraries that use syntax extensions. The general attitude that "coders are dumb, we need to protect them from themselves" lead to the development of mediocre languages like Java. Compare that to something like Racket, where despite some flaws most of the macros provide an obvious and very real benefit, without overcomplicating the compiler (for example the match macro, or the macros that constitute the C-FFI). Ideally in my eyes a language should provide the programmer with maximal possible expressiveness without compromising a core simple design.
- deleted 12y ago[deleted]