D vs Go in real life
Chris Cain
clcain at uncg.edu
Wed Dec 4 03:34:20 PST 2013
On Wednesday, 4 December 2013 at 11:23:35 UTC, Chris wrote:
> C's
>
> int numbers[];
>
> is really awkward. But I think that D's
>
> int[] numbers;
>
> is just as clear as Go's right-to-left declaration. I think the
> problem is not really the reading _direction_ but the reading
> _logic_ that makes clear what belongs to what. int[] is an
> array of integers, just as []int is an array of integers. It's
> clear because it's glued to the type and not to the variable
> name.
Yeah. D's is mostly fine on this. I wouldn't at all recommend a
change on this (even for D3). I'm just bringing up the point that
it's more natural to read "the other way around". And that C's
reading is terrible in this regard. I've never had an issue with
understanding D's reading (but, that said, C's reading hasn't
confused me after I learned the spiral rule, it's just annoyed
me).
More information about the Digitalmars-d
mailing list