How Nested Functions Work, part 1

language_fan foo at bar.com.invalid
Wed Sep 2 04:41:57 PDT 2009


Mon, 31 Aug 2009 14:42:09 -0400, Jeremie Pelletier thusly wrote:

> I agree with Walter here. While D is not the first place I see closures
> and nested functions, it is the first language I come across that blends
> delegates, closures and nested functions in a simple, elegant and
> intuitive manner.

Well..

> Its no surprise that I was literally drooling when I first read about
> how D does it, I had just spent a few weeks doing jQuery in JavaScript
> for a client back then and fell in love with closures, D had it all with
> better syntax :)
> 
> In D you can even send a function pointer to a delegate value!

I can see your point. I have previously mostly used OCaml, Mercury, 
Miranda, Haskell, SML, CL, Scheme, Qi, Ur, Clojure, Erlang, and Oz. It's 
not really that surprising to first find some flaws in the functional 
part of a new language.



More information about the Digitalmars-d mailing list