Go updates

Jesse Phillips jessekphillips+D at gmail.com
Tue Mar 23 21:36:01 PDT 2010


BLS wrote:

> 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.

Or:

Integer pointer array: int*[]
Integer array pointer: int[]*

Yes when you want to make a complete sentence out of it, the order
changes. Reading what it says tells the story correctly.



More information about the Digitalmars-d mailing list