digitalmars.D - Go updates
- bearophile (19/21) Mar 23 2010 While D2 will unsupport them, because D2 is probably flexible enough to ...
- BLS (16/37) Mar 23 2010 D vs Go
- bearophile (4/5) Mar 23 2010 :-) view of point your with agree fully don't I
- BLS (2/7) Mar 23 2010 Good point !!
- Jesse Phillips (6/53) Mar 23 2010 Or:
- Norbert Nemec (11/24) Mar 23 2010 The famous case in support of Go syntax:
Thanks to being backed by Google Go seems to improve: http://blog.golang.org/2010/03/go-whats-new-in-march-2010.htmlGo 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
Mar 23 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.htmlD 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.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
Mar 23 2010
BLS:So Go is just a pascalized C. who cares.:-) view of point your with agree fully don't I Bye, bearophile
Mar 23 2010
On 24/03/2010 03:02, bearophile wrote:BLS:Good point !!So Go is just a pascalized C. who cares.:-) view of point your with agree fully don't I Bye, bearophile
Mar 23 2010
BLS wrote:On 24/03/2010 02:39, bearophile wrote: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.Thanks to being backed by Google Go seems to improve: http://blog.golang.org/2010/03/go-whats-new-in-march-2010.htmlD 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.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
Mar 23 2010
bearophile wrote: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 :-(The famous case in support of Go syntax: In D syntax, a nested array int[A][B] x; has to be indexed as x[b][a] (implying that b runs over 0..B and a over 0..A) After all, it is an "array of B arrays of A integers", in other words an "integer-A-element-array-B-element-array". The same in Go ordering is more straightforward: [B][A]int x
Mar 23 2010