Is the compiler supposed to accept this?

Brian Schott briancschott at gmail.com
Wed Jul 10 14:32:59 PDT 2013


On Wednesday, 10 July 2013 at 21:16:30 UTC, Timon Gehr wrote:
> // (parameters) => expression ?
>
> In any case, please consider that it actually makes no sense to 
> restrict the expressiveness of the type signature based on how 
> the function body is specified. (Why on earth should one have 
> to use the { return expression; } syntax just in order to be 
> able to assert that no context pointer is required?)
>
> The documentation is in error here.

"(parameters) => expression" is mentioned in the source and I 
agree it's valid. I must have forgotton to copy-paste it.

I don't agree that "function(parameters) => expression" is valid 
though. Can any of the DMD devs clear up if this is intended?


More information about the Digitalmars-d mailing list