digitalmars.D - Re: I wrote some D today and it's completely blowing my mind. Ever
- Kagamin (2/13) Oct 06 2009
- Kagamin (6/6) Oct 06 2009 Lazy arguments are half-lambdas.
- Justin Johansson (12/21) Oct 06 2009 Often when the Marxes arrived at restaurants, there would be a long wait...
downs Wrote:Indeed. I like this comment:Don't know why you bother with Reddit, Walter. Going by a lot of the replies there, its a case of pearls before swine. Cheers -- Justin JohanssonSwine are smart.Of course, but they'll have to look at the function signature to see that.If you're reading code to find a bug, it won't be immediately obvious what's going on. In the worst case you'll need to recursively inspect all function signatures used by each function.One of Walter's goals was to make certain classes of bugs more difficult to occur -- a laudable one. Unfortunately this feature makes things harder to reason about.
Oct 06 2009
Lazy arguments are half-lambdas. void some_function(int x, lazy int y); void some_function(int x, int delegate() y); some_function(x, y++); some_function(x, (){ y++ }); Though typesavers will complain a lot.
Oct 06 2009
Kagamin Wrote:Lazy arguments are half-lambdas. void some_function(int x, lazy int y); void some_function(int x, int delegate() y); some_function(x, y++); some_function(x, (){ y++ }); Though typesavers will complain a lot.Often when the Marxes arrived at restaurants, there would be a long wait for a table. "Just tell the maître d' who we are," his wife would nag. (In his pre-moustache days, he was rarely recognized in public.) Groucho would say, "OK, OK. Good evening, sir. My name is Jones. This is Mrs. Jones, and here are all the little Joneses." Now his wife would be furious and insist that he tell the maître d' the truth. "Oh, all right," said Groucho. "My name is Smith. This is Mrs. Smith, and here are all the little Smiths." <small>Above quotation from http://en.wikipedia.org/wiki/Groucho_Marx and reproduced here under Creative Commons Attribution-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/</small> <JJ/>
Oct 06 2009