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

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 19 22:50:21 PST 2015


On Monday, January 19, 2015 16:18:25 Walter Bright via Digitalmars-d wrote:
> On 1/19/2015 2:51 PM, ponce wrote:
> > Current syntax is akin to C and C++, it means many people already read it
> > visually and it is easier to port C code to D.
>
> Bingo. It's designed to be an easy transition for people used to programming in
> C, C++ and Java.

That and the fact that most of the folks working on the language have been
programming in C, C++, etc. for years, and it probably never occurred to
most of them to have a different function declaration syntax in the first
place. Even if there's a better way to do something, if it never occurs to
you that there's anything wrong with the current way, you're not going to
come up with a new one.

- Jonathan M Davis



More information about the Digitalmars-d mailing list