On Mon, 2008-09-15 at 13:35 +1200, Greg Ewing wrote:
Cliff Wells wrote:
Breve more or less a functional DSL that barely resembles Python but actually *is* Python (in fact, I've seen someone assert that Breve templates could not possibly be actual Python code).
If it looks that little like Python, I'd say it really is a different language, and you have no right to expect to be able to use the Python compiler as-is to process it.
Well *I* think it looks like Python, but then I understand (as can I think anyone familiar with Python's magic methods), but at least superficially it gives a different impression.
In any case, Breve is mostly of interest in that it is the project that both made me appreciate the power of expressions and start bumping into Python's second-class support of them.
Rather than twisting Python to make it possible to abuse it even further, you'd be better off writing a Breve compiler in Python that produces Python code
I think code generation is arguably worse than functional programming.
(or maybe even translates it directly to Python bytecode).
A seriously complicated and highly technical bit of code I'd likely have to fix every few years (and maintain multiple versions of to support multiple Python versions)? No thanks.
In any case, I've already choked down my Python snobbery and ordered a Ruby book. Clearly where I want to go in programming isn't available in Python nor will it be any time soon.