Yeah, just seems kind of cool and the kind of thing programmers coming from other languages might expect. But agreed they're easy enough to get by without - was just curious.
On Tue, May 22, 2012 at 8:20 AM, Dominic Watson < [email protected]> wrote: > A server side example: > > cachedValue = cacheEngine.get( cacheKey, > functionToReturnCachedValueWhenNotInCache ); > > > Rather than: > > if ( not cacheEngine.exists( cacheKey ) ){ > > cacheEngine.set( cacheKey, functionToReturnCachedValueWhenNotInCache( > cacheKey ) ); > > } > > cachedValue = cacheEngine.get( cacheKey ); > > > Just another pattern to help make more terse code I guess. > > > 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 > -- Jason Blum http://twitter.com/phenotypical http://phenotypical.com -- online documentation: http://openbd.org/manual/ http://groups.google.com/group/openbd?hl=en
