PEP318: radical notion
Christophe Cavalaria
chris.cavalaria at free.fr
Wed Aug 25 18:33:31 EDT 2004
Arien Malec wrote:
> Christophe Cavalaria <chris.cavalaria at free.fr> wrote in
> news:412bc7e6$0$4065$626a14ce at news.free.fr:
>
>> Arien Malec wrote:
>
>>> Is there a valid use case that supports arbitrary magical
>>> non-metadata transformations of standalone functions?
>>
>> memoize for example. No metadata, only transformation, doesn't really
>> apply to a member function in fact ( although it might be possible à
>
> Classically, memoize is implemented as function composition, or as a true
> GoF decorator. It's not clear (to me, at least) how much benefit the
> syntactic sugar gets you.
Ease of writing and reading aren't benefits for you ?
>> Why is it that there are always some people who doesn't understand all
>> the possibilities of decorators and so want to minimise their
>> usefulness ?
>
> I dunno. Who are those people? My objection to PEP318 is that makes
> something that's really powerful (arbitrary transformation) look like a
> trivial declaration.
If that's your objection, say it. I'm ok with that. But don't do that :
people : we need generators for usage a, b, c
you : here is a great syntax. It handles case a and b in such a beautiful
way and it's much much better that some other proposal
people : what about case c ?
you : case what ?
> In Common Lisp, for instance, a defmacro form hints
> that powerful mojo is being performed; the same is not apparent in
> PEP318.
Well, if the @pie form isn't a clear way to say that something strange is
going on, I don't know what is :)
More information about the Python-list
mailing list