Like Go/Rust, why not to have "func" keyword before function declaration

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 19 13:36:50 PST 2015


On Monday, 19 January 2015 at 20:51:03 UTC, Alexey T. wrote:
> Will be much easier to read Source, if func declarataion begins 
> with keyword. "def" of "func". e.g.
>
> func myName(params.....): typeOfResult;
> or
> func myName(params...) -> typeOfResult;
>
> easier to read and PARSE. Next D version may allow--with 
> compatability of old syntad (C like where typeOfResult is 1st 
> id).

I have nothing against Rust, but that's the last place I'd go if 
I were looking for improved syntax. Personally I view it as 
visual clutter that will make it harder to read the program.


More information about the Digitalmars-d mailing list