Re: A little Go => Python story

2013-06-23 Thread OlliP
I knew a little Go and then by chance had a look at Python. The similarities in syntax were striking. Because of the very quick build times, Go feels like a scripting language. However, it really falls short on OOP. Delegates in Go can mimic inheritance to some extend, but method overriding (ak

Re: A little Go => Python story

2013-04-23 Thread bearophile
Sorry, the title of this thread should be "A little Python => Go story"... Bye, bearophile

Re: A little Go => Python story

2013-04-23 Thread bearophile
Luís Marques: The only one that seems "easy" to solve in D is adding sets, no? Considering the troubles given by the built-in D associative arrays, and the possibility to write good enough set literals like: auto s1 = set([1, 10, 5]); // helper function. Set!int items = iota(2, 11)

Re: A little Go => Python story

2013-04-23 Thread Jesse Phillips
On Tuesday, 23 April 2013 at 23:09:46 UTC, bearophile wrote: * If you're using JSON and your JSON is a mix of types, goood luck. You'll have to create a custom struct that matches the format of your JSON blob, and then Unmarshall the raw json into an instance of your custom struct. Much mo

Re: A little Go => Python story

2013-04-23 Thread Diggory
Perhaps you should be able to use void[T] for a set...

Re: A little Go => Python story

2013-04-23 Thread Luís.Marques
The only one that seems "easy" to solve in D is adding sets, no?

A little Go => Python story

2013-04-23 Thread bearophile
This blog post tells a short simple story of replacing Python with Go: http://blog.repustate.com/migrating-code-from-python-to-golang-what-you-need-to-know/2013/04/23/ Probably the SVM code was already written in C, and just called from Python. I don't know if later they have rewritten the SVM