commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [pattern] Command or Closure [was ThrowableHandler]
Date Fri, 09 Aug 2002 08:29:43 GMT


Martin Cooper wrote:
> 
>>-----Original Message-----
>>From: Stephen Colebourne [mailto:scolebourne@btopenworld.com]
>>Sent: Thursday, August 08, 2002 3:36 PM
>>To: Jakarta Commons Developers List; Ola Berg
>>Subject: [pattern] Command or Closure [was ThrowableHandler]
>>
>>
>>What do people read into these two classnames?
>>Are they the same, or different?
>>Is there a strict computer science meaning?
> 
> 
> I was going to type up the definition of a closure from my handy
> denotational semantics book, but there are lots of funky symbols that I
> don't know how to get into a mail message... ;-{
> 
> Here's a Smalltalk oriented description of closures:
> 
> http://wiki.cs.uiuc.edu/VisualWorks/Closures
> 
> and here's a reference that actually talks about the command pattern and
> closures in the same paragraph:
> 
> http://www.owlnet.rice.edu/~comp212/99-spring/Tutorials/12/
> 
> Here's the relevant text from the latter:
> 
> -----
> This idea of wrapping a function up in an object is called the command
> pattern, and the wrapped-up function is called the command. Sometimes the
> object itself is called a closure. Don't worry about the terminology if you
> haven't heard it before; just think "command object" when you hear
> "closure."
> -----
> 
> So they're not quite the same thing. So if a 'command' is a function/method
> and a 'closure' is an object, I don't know what we call the interface. ;-)

I committed the Command.
Since it's a "pattern" package, the Command interface is for a "Command 
pattern".

Makes sense to me.

Also, many know what a Command pattern is, from the GOF and the JDK, 
while the term closure is less known.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message