DIP27 available for destruction
deadalnix
deadalnix at gmail.com
Tue Feb 26 21:54:31 PST 2013
On Wednesday, 27 February 2013 at 05:34:44 UTC, kenji hara wrote:
> The mistake in C is mixing of function name and function
> address.
> At least there is one ambiguity which appearance and meaning
> does not
> correspond one-to-one.
>
That is false. In C, function pointers are done as follow :
void foo() {
printf("foo");
}
void (*functionPtr)(); // equivalent to D void function()
functionPtr;
functionPtr = &foo; // Note the presence of & operator.
functionPtr(); // Call foo
This is why I don't understand the point the 3 of you are trying
to make. Current behavior of D is much more close to C than what
the DIP proposes.
This behavior is very specific to C and C++. If C's behavior was
a mistake, then it an argument FOR this DIP, not against.
> In current D, the ambiguity is _already_ resolved - if you want
> to function
> address, use & operator.
>
D behave very much like C on that regard, so I don't really see
how this can be true.
> As far as I see, DIP27 will overturn the chess board, remove
> property
> feature, change the meaning of 'foo', deprecate '&foo', and
> finally add
> nothing for the language users.
>
No, DIP27 is only about functions. It says nothing about
properties. It add stable foundation we can build upon.
More information about the Digitalmars-d
mailing list