Re: where clause

2011-03-08 Thread bearophile
Caligo: I don't understand why so many here are obsessed with constantly trying to improve D and/or find things that are wrong with the language just so they can come up with a solution. We've had feature freeze, have we not? There are several unfinished features and parts in the current D2,

Re: where clause

2011-03-08 Thread spir
On 03/08/2011 09:37 AM, bearophile wrote: Caligo: I don't understand why so many here are obsessed with constantly trying to improve D and/or find things that are wrong with the language just so they can come up with a solution. We've had feature freeze, have we not? There are several

Re: where clause

2011-03-08 Thread Andrei Alexandrescu
On 3/8/11 12:37 AM, bearophile wrote: Caligo: I don't understand why so many here are obsessed with constantly trying to improve D and/or find things that are wrong with the language just so they can come up with a solution. We've had feature freeze, have we not? There are several

Re: where clause

2011-03-07 Thread Russel Winder
On Sun, 2011-03-06 at 20:23 -0500, bearophile wrote: [ . . . ] I wonder if you may have misunderstood the reason for the where clause in functional languages such as Haskell and ML (usually OCaml). In these languages the body of a function must be a single value-returning expression. This means

Re: where clause

2011-03-07 Thread bearophile
Russel Winder: I wonder if you may have misunderstood the reason for the where clause in functional languages such as Haskell and ML (usually OCaml). In these languages the body of a function must be a single value-returning expression. This means there has to be a separate clause for all

Re: where clause

2011-03-07 Thread spir
On 03/07/2011 02:23 AM, bearophile wrote: The where allows to write an expression where some parts of it are defined below it. In the where you are allowed to put one or more variables (immutable values in Haskell) and functions (values again). So first of all some usage examples from random

Re: where clause

2011-03-07 Thread spir
On 03/07/2011 09:26 AM, Russel Winder wrote: On Sun, 2011-03-06 at 20:23 -0500, bearophile wrote: [ . . . ] I wonder if you may have misunderstood the reason for the where clause in functional languages such as Haskell and ML (usually OCaml). In these languages the body of a function must

Re: where clause -- OT

2011-03-07 Thread spir
On 03/07/2011 12:28 PM, bearophile wrote: I like Python but I have found some Haskell code on web pages, that I copy and try to run. I am having many problems caused by tabs present in the original code that vanish in HTML and break haskell indentations, creating bugs. So be careful what you

Re: where clause

2011-03-07 Thread Caligo
I don't understand why so many here are obsessed with constantly trying to improve D and/or find things that are wrong with the language just so they can come up with a solution. We've had feature freeze, have we not? For someone who is relatively new to D, seeing all these discussions on topics

where clause

2011-03-06 Thread bearophile
decomposition of the code, that sometimes is more natural and clear. You are able to express a complex formula at high level first, and give its details into the where clause. So it inverts the order of code, sometimes such code is simpler to understand. - It helps to keep the namespace clean