Herb Sutter briefly discusses D during interview
Timon Gehr
timon.gehr at gmx.ch
Wed Jun 8 08:38:26 PDT 2011
Jonathan M Davis wrote:
> ...
> No, people don't normally look at declarations such as
>
> int* a;
>
> as being right to left. But from the compiler's perspective, they are. The
>
> compiler doesn't look at the type of a as being an int pointer. It looks at it
> as being a pointer to an int. The * comes first and then the int.
> [snip.]
It is more convenient for the compiler to read the declaration left to right to
construct the type. (just like for people)
Timon
More information about the Digitalmars-d
mailing list