For Programmers: Free Programming Magazines  


Home > Archive > Tcl > September 2006 > Re: Closures









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Closures
Bruce Stephens

2006-09-28, 7:02 pm

Neil Madden <nem@cs.nott.ac.uk> writes:

> Bruce Stephens wrote:


[...]

>
> That is true. I'd still prefer to have both forms of scope capture
> available, as in Smalltalk etc. Using a single-method object, with
> all the baggage of (multiple) inheritance and so forth, just seems a
> bit too heavyweight for many cases.


Maybe.

I'm just thinking that one of the objections against adding closures
to Java and C++ is that you can get almost the same effect just by
putting whatever you want saved in an object. But then that forces
you to list everything you want saved, whereas you don't with
closures. But if you have to list things with closures, then that
seems to me to weaken the case for closures quite a bit.

Maybe I'm thinking in terms of static languages (where if you create
an object without any inheritance or anything then it never has
inheritance, so it has no particular overhead).
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com