I guess it's just another pattern that becomes available to make for more
terse code. An example might be a caching engine's 'get' method, i.e.
cachedValue = cacheEngine.get( cacheKey, functionToGetValueWhenNotInCache
);
rather than:
if ( not cacheEngine.exists( cacheKey ) {
cacheEngine.set( cacheKey, functionToGetValueWhenNotInCache( cacheKey )
);
}
cachedValue = cacheEngine.get( cacheKey );
On Sunday, 20 May 2012 21:24:43 UTC+1, Travis wrote:
>
> What practical purposes would one even need closures for in a server-
> side environment? Just wondering.
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en