Delayed evaluation of expressions

Marko Rauhamaa marko at
Wed Mar 26 23:45:19 CET 2014

Chris Angelico <rosuav at>:

> You prove here that Python has first-class expressions in the same way
> that 80x86 assembly language has garbage collection. Sure, you can
> implement it using the primitives you have, but that's not support.

I was more reminded of STL and Boost. For example:

   std::for_each(v.begin(), v.end(),
         case_statement<0>(std::cout << constant("zero")),
         case_statement<1>(std::cout << constant("one")),
         default_statement(cout << constant("other: ") << _1)
       cout << constant("\n") 



More information about the Python-list mailing list