Go updates

BLS windevguy at hotmail.de
Tue Mar 23 18:57:49 PDT 2010


On 24/03/2010 02:39, bearophile wrote:
> Thanks to being backed by Google Go seems to improve:
> http://blog.golang.org/2010/03/go-whats-new-in-march-2010.html
>
>> Go also now natively supports complex numbers.<
>
> While D2 will unsupport them, because D2 is probably flexible enough to not need to keep them as built-ins :-)
>
>
>> The syntax x[lo:] is now shorthand for x[lo:len(x)].<
>
> That's identical to the Python syntax. But the D version x[lo .. $] is acceptable.
>
> But there's a len() my dlibs too. It helps me avoid to write "length" all the time and avoids my typos, and it can be used as delegate too:
> map(&len, arr);
>
> This Go syntax is cute:
> Pointer to int: *int
> Array of ints: []int
> Array of pointer to ints: []*int
> Pointer to array of ints: *[]int
>
> In D it becomes:
> Pointer to int: int*
> Array of ints: int[]
> Array of pointer to ints: int*[]
> Pointer to array of ints: int[]*
>
> Here I think I like the Go version better :-(
>
> Bye,
> bearophile

D vs Go

I do not agree
If we read D from RIGHT to LEFT like
Pointer to array of ints:
int[]*

than we have
*   //pointer to
[]  // array  of
int

in Go
 From LEFT to RIGHT
*
[]
int

So Go is just a pascalized C. who cares.



More information about the Digitalmars-d mailing list