A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-February/032719.html below:

[Python-Dev] Re: Extended Function syntax

[Python-Dev] Re: Extended Function syntaxAahz aahz@pythoncraft.com
Sat, 1 Feb 2003 17:41:54 -0500
On Sat, Feb 01, 2003, Guido van Rossum wrote:
>
> I received this from Glyph.  He brings up some interesting use cases
> for thunks.  I guess it could be used for "on" style event handler
> declarations.  Hmm, you could even craft your own case statement with
> his suggestion:
> 
>   switch(expr):
>     case(val1):
>       block1
>     case(val2):
>       block2
>     default:
>       block3
> 
> This actually makes me worry -- I didn't plan thunks to be the answer
> to all problems.  A new idea that could cause a paradigm landslide is
> not necessarily right.

That's why I made my lambda joke earlier, and why I've been pushing for
thunk types at the syntactic level.  I think we do need a generalizable
thunk from the POV of the Python internals, but I don't think we should
expose that mechanism to the language itself, except through specific
keywords or pseudo-keywords.  Using "as" with pseudo-keywords gives the
best of all worlds, I think, and allowing the [] notation to operate on
a thunk gives a fair amount of flexibility without permitting baroque
syntactic forms.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours."  --Richard Bach



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4