Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Simple prototyping in Python

Reply
Thread Tools

Simple prototyping in Python

 
 
Michael Geary
Guest
Posts: n/a
 
      05-05-2004
> > Greg Ewing wrote:
> >>BTW, IMO [the closure] is a seriously warped technique
> >>that I would never use, even in Javascript. I can't see any
> >>benefit in it that's anywhere near worth the obfuscation.


> Michael Geary wrote:
> > I think part of the problem is the contrived examples that
> > we all use to illustrate closures.


Greg wrote:
> Just in case it wasn't clear, I was talking about that
> particular use of a closure, i.e. simulating an object
> with a private instance variable. I'm well aware that
> there are other, better uses for closures.
>
> The example you posted is a reasonable use of
> closures (although the in-line-constructed object
> passed as an argument to a function made my brain
> hurt a bit while trying to parse it!)


Ah, roger that. Naturally, it's also possible to write that code by creating
the events object first and then just passing a reference to it into the
function call--it sounds like that would make it easier to read.

-Mike


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fast and easy GUI prototyping with Python erokar@gmail.com Python 10 06-23-2008 07:34 PM
Announcing new scripting/prototyping language Dave Allison C++ 37 03-04-2004 05:45 PM
Re: No call for Ada (was Re: Announcing new scripting/prototyping language) Ludovic Brenta C++ 86 02-19-2004 09:19 AM
Python as a numerical prototyping language. Carl Python 9 01-06-2004 07:02 PM
Prototyping rules/recommendations sought rs C Programming 13 12-01-2003 10:13 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57