Re: How Nested Functions Work, part 1

2009-09-04 Thread Edward Diener
Andrei Alexandrescu wrote: Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably alway

Re: How Nested Functions Work, part 1

2009-09-04 Thread Don
Andrei Alexandrescu wrote: Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably alway

Re: How Nested Functions Work, part 1

2009-09-03 Thread Andrei Alexandrescu
Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most

Re: How Nested Functions Work, part 1

2009-09-03 Thread Edward Diener
Andrei Alexandrescu wrote: Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most likely, you're going

Re: How Nested Functions Work, part 1

2009-09-03 Thread Andrei Alexandrescu
Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most likely, you're going to be passing it a lambda.

Re: How Nested Functions Work, part 1

2009-09-03 Thread Andrei Alexandrescu
Edward Diener wrote: Andrei Alexandrescu wrote: Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most likely, you're going to be passing it a lambda.

Re: How Nested Functions Work, part 1

2009-09-03 Thread Jarrett Billingsley
On Thu, Sep 3, 2009 at 7:10 PM, grauzone wrote: > > Probably the same type as .ptr? void*? That's just silly. Let's just throw all static typing out the window. :P > And by the way, I find it really strange, that .funcptr results into an > incorrectly typed function pointer, that basically has th

Re: How Nested Functions Work, part 1

2009-09-03 Thread grauzone
Jarrett Billingsley wrote: On Thu, Sep 3, 2009 at 6:48 PM, Edward Diener wrote: What I imagine will happen in D is that when an updated delegate type allows itself to be initialized with a function pointer, the vast majority of D programmers will use delegate for all callables and the function p

Re: How Nested Functions Work, part 1

2009-09-03 Thread Jarrett Billingsley
On Thu, Sep 3, 2009 at 6:48 PM, Edward Diener wrote: > What I imagine will happen in D is that when an updated delegate type allows > itself to be initialized with a function pointer, the vast majority of D > programmers will use delegate for all callables and the function pointer > will remain sim

Re: How Nested Functions Work, part 1

2009-09-03 Thread Edward Diener
Andrei Alexandrescu wrote: Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most likely, you're going to be passing it a lambda. However I agree that i

Re: How Nested Functions Work, part 1

2009-09-03 Thread Andrei Alexandrescu
Edward Diener wrote: Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most likely, you're going to be passing it a lambda. However I agree that it would be very, very nice t

Re: How Nested Functions Work, part 1

2009-09-02 Thread Daniel Keep
Jarrett Billingsley wrote: > ... > > void foob(T: Ret function(Args), Ret, Args...)(T func) > { > pragma(msg, ParameterTupleOf!(T).stringof); > static void wtf(ParameterTupleOf!(T) args) {} > pragma(msg, ParameterTupleOf!(T).stringof); > } > > void blah(int, ref float) {} > >

Re: How Nested Functions Work, part 1

2009-09-02 Thread Edward Diener
Jarrett Billingsley wrote: On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most likely, you're going to be passing it a lambda. However I agree that it would be very, very nice to be able to make APIs

Re: How Nested Functions Work, part 1

2009-09-02 Thread Jarrett Billingsley
On Wed, Sep 2, 2009 at 4:53 PM, Nick Sabalausky wrote: >> void foo(bool delegate() dg) { >>    dg(); >> } >> foo({return true;}); >> > > Sure, when there's no parameters (...does that work in D1, or just D2?...), > but even then, I still always end up going though a process like this when > definin

Re: How Nested Functions Work, part 1

2009-09-02 Thread Nick Sabalausky
"Jeremie Pelletier" wrote in message news:h7m6nb$2k8...@digitalmars.com... > > The only valid syntax is up there, Yea, but which one? ;) > I almost only use delegates in D, since it allows functions pointers, > delegates, closures and nested functions to be passed. Function pointers > only a

Re: How Nested Functions Work, part 1

2009-09-02 Thread Nick Sabalausky
"Jarrett Billingsley" wrote in message news:mailman.30.1251909028.20261.digitalmar...@puremagic.com... > >I'd really, really like to replace your entire module with this: > >Ret delegate(Args) toDg(T: Ret function(Args), Ret, Args...)(T func) >{ >[snip] >} > >But I can't. :C Yea. But even then,

Re: How Nested Functions Work, part 1

2009-09-02 Thread Michiel Helvensteijn
Michiel Helvensteijn wrote: > Basically, any function that reads i may not be called before i is > declared, nor in i's initialization. Of course, in reality, it depends on > the control flow within the function. But that's holy grail stuff. So: > conservatively. Oh, you may also not take a deleg

Re: How Nested Functions Work, part 1

2009-09-02 Thread Michiel Helvensteijn
Jarrett Billingsley wrote: > It wouldn't even be that difficult. Basically if you treat > forward-referenced nested functions as a sort of goto, the same rules > should apply: a call to a nested function may not skip the > initialization of any variables it depends on. When i's initializer is > ev

Re: How Nested Functions Work, part 1

2009-09-02 Thread Nick Sabalausky
"Jarrett Billingsley" wrote in message news:mailman.32.1251920615.20261.digitalmar...@puremagic.com... > On Wed, Sep 2, 2009 at 3:29 PM, Don wrote: >> Michiel Helvensteijn wrote: >>> >>> Rainer Deyke wrote: >>> That can lead to subtle problems in the case of functions: int i = f();

Re: How Nested Functions Work, part 1

2009-09-02 Thread Jarrett Billingsley
On Wed, Sep 2, 2009 at 3:29 PM, Don wrote: > Michiel Helvensteijn wrote: >> >> Rainer Deyke wrote: >> I still find it silly that it was built that way. Seems to me you should be able to forward-reference *any* symbol that has a value that can't change over its lifetime. Functions, co

Re: How Nested Functions Work, part 1

2009-09-02 Thread Don
Michiel Helvensteijn wrote: Rainer Deyke wrote: I still find it silly that it was built that way. Seems to me you should be able to forward-reference *any* symbol that has a value that can't change over its lifetime. Functions, const/immutable vars, typedefs, classes, etc. That can lead to sub

Re: How Nested Functions Work, part 1

2009-09-02 Thread Michiel Helvensteijn
Rainer Deyke wrote: >> I still find it silly that it was built that way. Seems to me you should >> be able to forward-reference *any* symbol that has a value that can't >> change over its lifetime. Functions, const/immutable vars, typedefs, >> classes, etc. > > That can lead to subtle problems in

Re: How Nested Functions Work, part 1

2009-09-02 Thread Rainer Deyke
Michiel Helvensteijn wrote: > I still find it silly that it was built that way. Seems to me you should be > able to forward-reference *any* symbol that has a value that can't change > over its lifetime. Functions, const/immutable vars, typedefs, classes, etc. That can lead to subtle problems in th

Re: How Nested Functions Work, part 1

2009-09-02 Thread Jarrett Billingsley
On Wed, Sep 2, 2009 at 9:45 AM, Andrei Alexandrescu wrote: > Jarrett Billingsley wrote: >> >> Well repeat should probably always take a delegate since most likely, >> you're going to be passing it a lambda. However I agree that it would >> be very, very nice to be able to make APIs take just delega

Re: How Nested Functions Work, part 1

2009-09-02 Thread Jeremie Pelletier
Nick Sabalausky Wrote: > "Jeremie Pelletier" wrote in message > news:h7h5i1$5m...@digitalmars.com... > > > > 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, eleg

Re: How Nested Functions Work, part 1

2009-09-02 Thread Jarrett Billingsley
On Wed, Sep 2, 2009 at 9:49 AM, Daniel Keep wrote: > > Jarrett Billingsley wrote: >> Well repeat should probably always take a delegate since most likely, >> you're going to be passing it a lambda. However I agree that it would >> be very, very nice to be able to make APIs take just delegates and >

Re: How Nested Functions Work, part 1

2009-09-02 Thread Daniel Keep
Jarrett Billingsley wrote: > Well repeat should probably always take a delegate since most likely, > you're going to be passing it a lambda. However I agree that it would > be very, very nice to be able to make APIs take just delegates and > allow functions to be implicitly cast to them. You can a

Re: How Nested Functions Work, part 1

2009-09-02 Thread Andrei Alexandrescu
Jarrett Billingsley wrote: Well repeat should probably always take a delegate since most likely, you're going to be passing it a lambda. However I agree that it would be very, very nice to be able to make APIs take just delegates and allow functions to be implicitly cast to them. You can already

Re: How Nested Functions Work, part 1

2009-09-02 Thread Jarrett Billingsley
On Wed, Sep 2, 2009 at 6:07 AM, Nick Sabalausky wrote: > Umm, yea. If you don't already know what I'm getting at with that, then... > Quick! For each of these, valid or invalid?: > // D > void repeat(int n, void delegate(int i) dg) > { >    foreach(int i; 0..n) >        d

Re: How Nested Functions Work, part 1

2009-09-02 Thread Jari-Matti Mäkelä
Nick Sabalausky wrote: > "Jeremie Pelletier" wrote in message > news:h7h5i1$5m...@digitalmars.com... >> >> 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

Re: How Nested Functions Work, part 1

2009-09-02 Thread bearophile
If the loop index "i" isn't necessary, you can use simpler code: import std.stdio: writeln; void repeat(TF)(int n, lazy TF callme) { foreach (i; 0 .. n) callme(); } void main() { repeat(5, writeln("hi")); } Bye, bearophile

Re: How Nested Functions Work, part 1

2009-09-02 Thread bearophile
Nick Sabalausky: > Quick! For each of these, valid or invalid?: I may like this one: import std.stdio: writeln; import d.templates: IsCallable; void repeat(TyCall)(int n, TyCall callme) if (IsCallable!TyCall) { foreach (i; 0 .. n) callme(i); } void main() { repeat(5, (int i){ wr

Re: How Nested Functions Work, part 1

2009-09-02 Thread language_fan
Wed, 02 Sep 2009 13:35:05 +0200, Michiel Helvensteijn thusly wrote: > language_fan wrote: > >>> I agree it would be better to allow forward references for nested >>> functions, I just wished to point out that the current behavior is not >>> a bug, it was built that way. >> >> That's great news a

Re: How Nested Functions Work, part 1

2009-09-02 Thread language_fan
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 mann

Re: How Nested Functions Work, part 1

2009-09-02 Thread Michiel Helvensteijn
language_fan wrote: >> I agree it would be better to allow forward references for nested >> functions, I just wished to point out that the current behavior is not a >> bug, it was built that way. > > That's great news actually. It might even mean that this might change > some day. I still find i

Re: How Nested Functions Work, part 1

2009-09-02 Thread language_fan
Mon, 31 Aug 2009 13:17:11 -0700, Walter Bright thusly wrote: > I agree it would be better to allow forward references for nested > functions, I just wished to point out that the current behavior is not a > bug, it was built that way. That's great news actually. It might even mean that this might

Re: How Nested Functions Work, part 1

2009-09-02 Thread Nick Sabalausky
"Jeremie Pelletier" wrote in message news:h7h5i1$5m...@digitalmars.com... > > 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. > I almos

Re: How Nested Functions Work, part 1

2009-09-01 Thread Walter Bright
Walter Bright wrote: http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ Another thread on it! http://www.reddit.com/r/programming/comments/9ga7e/c_lambdas_vs_apples_c_blocks/

Re: How Nested Functions Work, part 1

2009-09-01 Thread Manfred_Nowak
Walter Bright wrote: > I try to [...] rofl :-) -manfred

Re: How Nested Functions Work, part 1

2009-09-01 Thread Daniel Keep
Michel Fortin wrote: > On 2009-08-30 17:34:36 -0400, Walter Bright > said: > >> http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ >> > > It's >> > true that C doesn't have nested functions, but Apple's version of C, C++ > and Objective-C, starting with Snow L

Re: How Nested Functions Work, part 1

2009-09-01 Thread Michel Fortin
On 2009-08-30 17:34:36 -0400, Walter Bright said: http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ It's true that C doesn't have nested functions, but Apple's version of C, C++ and Objective-C, starting with Snow Leopard, has it. Well, it has nested fu

Re: How Nested Functions Work, part 1

2009-08-31 Thread Walter Bright
Bill Baxter wrote: Some of us read the NG via email, not a newsreader. Thunderbird email has an option to view emails in a threaded form.

Re: How Nested Functions Work, part 1

2009-08-31 Thread Walter Bright
Bill Baxter wrote: I don't think gmail can do that. Anyway, pretty much Walter is the only one here who regularly writes replies with absolutely no context, so it's not a huge problem. I try to counterbalance the person(s) who quote a 90 line message and add a single sentence at the end!

Re: How Nested Functions Work, part 1

2009-08-31 Thread Daniel Keep
Tom S wrote: > Walter Bright wrote: >> language_fan wrote: >>> This information is also taught in basic university level compiler >>> courses. >> >> I bet only a tiny fraction of programmers have taken university >> compiler classes. (Also, they were not covered in compiler classes I >> took.) Co

Re: How Nested Functions Work, part 1

2009-08-31 Thread Bill Baxter
On Mon, Aug 31, 2009 at 3:30 PM, Jeremie Pelletier wrote: > Andrei Alexandrescu Wrote: > >> Jarrett Billingsley wrote: >> > On Mon, Aug 31, 2009 at 1:14 PM, Walter >> > Bright wrote: >> >> Thanks! >> >> >> > >> > I don't mean to pull a Stewart, but please be sure to quote a bit of >> > the post you

Re: How Nested Functions Work, part 1

2009-08-31 Thread Jarrett Billingsley
On Mon, Aug 31, 2009 at 6:30 PM, Jeremie Pelletier wrote: > Andrei Alexandrescu Wrote: > >> Jarrett Billingsley wrote: >> > On Mon, Aug 31, 2009 at 1:14 PM, Walter >> > Bright wrote: >> >> Thanks! >> >> >> > >> > I don't mean to pull a Stewart, but please be sure to quote a bit of >> > the post you

Re: How Nested Functions Work, part 1

2009-08-31 Thread Jarrett Billingsley
On Mon, Aug 31, 2009 at 4:11 PM, Andrei Alexandrescu wrote: > Jarrett Billingsley wrote: >> >> On Mon, Aug 31, 2009 at 1:14 PM, Walter >> Bright wrote: >>> >>> Thanks! >>> >> >> I don't mean to pull a Stewart, but please be sure to quote a bit of >> the post you're responding to. If you don't, it's

Re: How Nested Functions Work, part 1

2009-08-31 Thread Jeremie Pelletier
Andrei Alexandrescu Wrote: > Jarrett Billingsley wrote: > > On Mon, Aug 31, 2009 at 1:14 PM, Walter > > Bright wrote: > >> Thanks! > >> > > > > I don't mean to pull a Stewart, but please be sure to quote a bit of > > the post you're responding to. If you don't, it's virtually impossible > > to te

Re: How Nested Functions Work, part 1

2009-08-31 Thread Bill Baxter
On Mon, Aug 31, 2009 at 2:05 PM, Adam D. Ruppe wrote: > On Mon, Aug 31, 2009 at 01:57:41PM -0700, Bill Baxter wrote: >> Some of us read the NG via email, not a newsreader. > > My email client (mutt) can do threading on it too. You might want to check > the settings on your mail reader and see if yo

Re: How Nested Functions Work, part 1

2009-08-31 Thread Adam D. Ruppe
On Mon, Aug 31, 2009 at 01:57:41PM -0700, Bill Baxter wrote: > Some of us read the NG via email, not a newsreader. My email client (mutt) can do threading on it too. You might want to check the settings on your mail reader and see if you have a threading option - the necessary headers are in the m

Re: How Nested Functions Work, part 1

2009-08-31 Thread Bill Baxter
On Mon, Aug 31, 2009 at 1:11 PM, Andrei Alexandrescu wrote: > Jarrett Billingsley wrote: >> >> On Mon, Aug 31, 2009 at 1:14 PM, Walter >> Bright wrote: >>> >>> Thanks! >>> >> >> I don't mean to pull a Stewart, but please be sure to quote a bit of >> the post you're responding to. If you don't, it's

Re: How Nested Functions Work, part 1

2009-08-31 Thread Tom S
Walter Bright wrote: language_fan wrote: This information is also taught in basic university level compiler courses. I bet only a tiny fraction of programmers have taken university compiler classes. (Also, they were not covered in compiler classes I took.) Consider also that the Java JVM doe

Re: How Nested Functions Work, part 1

2009-08-31 Thread Walter Bright
I agree it would be better to allow forward references for nested functions, I just wished to point out that the current behavior is not a bug, it was built that way.

Re: How Nested Functions Work, part 1

2009-08-31 Thread Andrei Alexandrescu
Jarrett Billingsley wrote: On Mon, Aug 31, 2009 at 1:14 PM, Walter Bright wrote: Thanks! I don't mean to pull a Stewart, but please be sure to quote a bit of the post you're responding to. If you don't, it's virtually impossible to tell who you're talking to when viewing the mailing lists.

Re: How Nested Functions Work, part 1

2009-08-31 Thread Jarrett Billingsley
On Mon, Aug 31, 2009 at 1:14 PM, Walter Bright wrote: > Thanks! > I don't mean to pull a Stewart, but please be sure to quote a bit of the post you're responding to. If you don't, it's virtually impossible to tell who you're talking to when viewing the mailing lists.

Re: How Nested Functions Work, part 1

2009-08-31 Thread Jeremie Pelletier
Walter Bright Wrote: > language_fan wrote: > > For what it's worth, they also seem somewhat buggy in D. Hopefully > > writing the articles motivates fixing those issues :) For example one > > can't call symbols before their declaration on non-global scope. > > That's actually not a bug. In func

Re: How Nested Functions Work, part 1

2009-08-31 Thread Walter Bright
language_fan wrote: For what it's worth, they also seem somewhat buggy in D. Hopefully writing the articles motivates fixing those issues :) For example one can't call symbols before their declaration on non-global scope. That's actually not a bug. In function scopes, you can't reference a va

Re: How Nested Functions Work, part 1

2009-08-31 Thread Jeremie Pelletier
Walter Bright Wrote: > language_fan wrote: > > This seems more like an advertisement of D than practical new information > > for compiler construction. Nesting functions is the basic feature of > > functional languages. Moreover even procedural Algol based languages such > > as Pascal have alwa

Re: How Nested Functions Work, part 1

2009-08-31 Thread language_fan
Mon, 31 Aug 2009 10:37:29 -0700, Walter Bright thusly wrote: > language_fan wrote: >> This seems more like an advertisement of D than practical new >> information for compiler construction. Nesting functions is the basic >> feature of functional languages. Moreover even procedural Algol based >> l

Re: How Nested Functions Work, part 1

2009-08-31 Thread Walter Bright
language_fan wrote: This seems more like an advertisement of D than practical new information for compiler construction. Nesting functions is the basic feature of functional languages. Moreover even procedural Algol based languages such as Pascal have always supported them, too. But not C, C+

Re: How Nested Functions Work, part 1

2009-08-31 Thread Walter Bright
Steven Schveighoffer wrote: Am I missing something or did you repeat the "Let's rewrite abc and def in C to illustrate the semantics" part at the end? Is there something different I'm supposed to be reading? Eh, you're right.

Re: How Nested Functions Work, part 1

2009-08-31 Thread Walter Bright
Thanks!

Re: How Nested Functions Work, part 1

2009-08-31 Thread language_fan
Sun, 30 Aug 2009 14:34:36 -0700, Walter Bright thusly wrote: > http://www.reddit.com/r/programming/comments/9fk6g/ how_nested_functions_work_part_1/ This seems more like an advertisement of D than practical new information for compiler construction. Nesting functions is the basic feature of fun

Re: How Nested Functions Work, part 1

2009-08-31 Thread Jeremie Pelletier
Walter Bright Wrote: > That's very nice, could you post that on reddit? Just did, I even changed "D" to "the D programming language" because I know you like it for search engine referencing :) http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/c0cm3bk

Re: How Nested Functions Work, part 1

2009-08-31 Thread Steven Schveighoffer
On Sun, 30 Aug 2009 17:34:36 -0400, Walter Bright wrote: http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ Am I missing something or did you repeat the "Let's rewrite abc and def in C to illustrate the semantics" part at the end? Is there something di

Re: How Nested Functions Work, part 1

2009-08-31 Thread Tim M
Walter Bright Wrote: > http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ Have had a quick look through. You could have explained that D supports closures and how the implementation supports it. Also looked in to C# before complaining about it not semantically

Re: How Nested Functions Work, part 1

2009-08-30 Thread Jarrett Billingsley
On Sun, Aug 30, 2009 at 10:54 PM, Jeremie Pelletier wrote: > > I need to try that out, its most likely a bug since 'in' means 'const scope' > now. > > Check my second code bit, the delegate is declared as scope and it doesn't > optimize, maybe the compiler only checks if the closure is being dere

Re: How Nested Functions Work, part 1

2009-08-30 Thread Walter Bright
That's very nice, could you post that on reddit?

Re: How Nested Functions Work, part 1

2009-08-30 Thread Jeremie Pelletier
Jarrett Billingsley Wrote: > On Sun, Aug 30, 2009 at 9:00 PM, Jeremie Pelletier wrote: > > Walter Bright Wrote: > > > >> http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ > > > > I really like the way nested functions and closures are done in D. > > Especially b

Re: How Nested Functions Work, part 1

2009-08-30 Thread Jarrett Billingsley
On Sun, Aug 30, 2009 at 9:00 PM, Jeremie Pelletier wrote: > Walter Bright Wrote: > >> http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ > > I really like the way nested functions and closures are done in D. Especially > because they are the same thing as delegate

Re: How Nested Functions Work, part 1

2009-08-30 Thread Jeremie Pelletier
Walter Bright Wrote: > http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/ I really like the way nested functions and closures are done in D. Especially because they are the same thing as delegate and closures. But speaking of closures, I did notice something th

How Nested Functions Work, part 1

2009-08-30 Thread Walter Bright
http://www.reddit.com/r/programming/comments/9fk6g/how_nested_functions_work_part_1/