On Jun 22, 8:09 pm, Douglas Alan <[EMAIL PROTECTED]> wrote: > Functionality is no good if it's too cumbersome to use. For instance, > Scheme gives you first class continuations, which Python doesn't. > Continuations let you do *all sorts* of interesting things that you > just cannot do in Python. Like backtracking, for instance. (Well > maybe you could do backtracking in Python with lots of putting code > into strings and liberal use of eval, for all I know, but the results > would almost certainly be too much of a bear to actually use.) > > Now, continuations, by themselves, in Scheme actually don't buy you > very much, because although they let you do some crazy powerful > things, making use of them to do so, is too confusing and verbose. In > order to actually use this very cool functionality, you need macros so > that you can wrap a pretty and easy-to-use face on top of all the > delicious continuation goodness. > > You'll, just have to trust me on this one. I've written code with > continuations, and I just couldn't make heads or tails out of the code > a few hours later. But when prettied-up with a nice macro layer, they > can be a joy to behold.
Been there, done that. So what? Your example will not convince any Pythonista. The Pythonista expects Guido to do the language job and the application developer to do the application job. Consider for instance generators. In Python they are already implemented in the core language and the application developer does not care at all about implementing them. In Scheme I am supposed to implement them myself with continuations, but why should I do that, except as a learning exercise? It is much better if competent people are in charge of the very low level stuff and give me just the high level tools. I essentially view macros are low- level performance hacks, useful for language developers more than for application developers. BTW, there are already Python-like languages with macros (i.e. logix) and still nobody use them, including people with a Scheme/Lisp background. That should be telling you something. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list