Re: Functional Programming with D

2015-08-28 Thread Kingsley via Digitalmars-d-announce
never say they are the same; you say similar. Nothing is wrong with that. :) Ali This is excellent information on functional programming with D. I would love to see a lot more information in this area - perhaps a much longer article covering in more detail - and also covering what is missing

Re: Functional Programming with D

2015-08-28 Thread Russel Winder via Digitalmars-d-announce
On Fri, 2015-08-28 at 06:45 +, Kingsley via Digitalmars-d-announce wrote: […] This is excellent information on functional programming with D. I would love to see a lot more information in this area - perhaps a much longer article covering in more detail - and also covering what

Functional Programming in D on reddit

2013-04-18 Thread Andrei Alexandrescu
http://www.reddit.com/r/programming/comments/1clufn/functional_programming_with_d/ Andrei

Re: Functional Programming with D

2013-04-14 Thread anonymous
On Sunday, 14 April 2013 at 06:35:53 UTC, qznc wrote: Sat, 13 Apr 2013 17:38:24 -0700: Ali Çehreli wrote [...] When it is a reference though, not immutable but D's const is similar to C's const. Otherwise, there is the following difference: // in C: I have no idea whether c is immutable

Re: Functional Programming with D

2013-04-14 Thread Ali Çehreli
On 04/13/2013 11:35 PM, qznc wrote: D's immutable is similar to C's const only when we are talking about values: const int c_i = 42;// in C immutable d_i = 42;// in D When it is a reference though, not immutable but D's const is similar to C's const. Otherwise, there is the

Functional Programming with D

2013-04-13 Thread qznc
I wrote a small article to summarize D's suitability for functional programming. http://beza1e1.tuxen.de/articles/functional_D.html Feedback welcome! :)

Re: Functional Programming with D

2013-04-13 Thread Vladimir Panteleev
On Saturday, 13 April 2013 at 12:29:29 UTC, qznc wrote: Feedback welcome! :) You wrote: While there is no syntactic sugar, What about lambdas? http://dlang.org/expression.html#Lambda

Re: Functional Programming with D

2013-04-13 Thread qznc
Sat, 13 Apr 2013 15:03:51 +0200: Vladimir Panteleev wrote On Saturday, 13 April 2013 at 12:29:29 UTC, qznc wrote: While there is no syntactic sugar, What about lambdas? http://dlang.org/expression.html#Lambda Oh. I forgot about those. Thanks! The syntactic sugar seems to be quite

Re: Functional Programming with D

2013-04-13 Thread Timon Gehr
On 04/13/2013 05:25 PM, qznc wrote: Sat, 13 Apr 2013 15:03:51 +0200: Vladimir Panteleev wrote On Saturday, 13 April 2013 at 12:29:29 UTC, qznc wrote: While there is no syntactic sugar, What about lambdas? http://dlang.org/expression.html#Lambda Oh. I forgot about those. Thanks! The

Re: Functional Programming with D

2013-04-13 Thread qznc
Sat, 13 Apr 2013 17:46:10 +0200: Timon Gehr wrote On 04/13/2013 05:25 PM, qznc wrote: Sat, 13 Apr 2013 15:03:51 +0200: Vladimir Panteleev wrote On Saturday, 13 April 2013 at 12:29:29 UTC, qznc wrote: While there is no syntactic sugar, What about lambdas?

Re: Functional Programming with D

2013-04-13 Thread qznc
Sat, 13 Apr 2013 15:03:51 +0200: Vladimir Panteleev wrote On Saturday, 13 April 2013 at 12:29:29 UTC, qznc wrote: Feedback welcome! :) You wrote: While there is no syntactic sugar, What about lambdas? http://dlang.org/expression.html#Lambda I added them to the article and

Re: Functional Programming with D

2013-04-13 Thread bearophile
Timon Gehr: auto square6 = x = x*x; no. (valid grammar, but you need some type annotation.) In theory a syntax like: alias square6 = x = x * x; Can be a shorthand for a template function like: auto square6(T0)(T0 x) { return x * x; } Bye, bearophile

Re: Functional Programming with D

2013-04-13 Thread Ali Çehreli
On 04/13/2013 05:29 AM, qznc wrote: I wrote a small article to summarize D's suitability for functional programming. http://beza1e1.tuxen.de/articles/functional_D.html Feedback welcome! :) Nice article; thanks. :) Some quotes from the article and some notes: 1) can qualify variables as