4 ms·
My general feeling is that Go is kind of like a lighter Java. Go is compiled, but also optimized for fast compile times, and it should be faster than python. H
by heyrhett 15y ago
My general feeling is that Go is kind of like a lighter Java. Go is compiled, but also optimized for fast compile times, and it should be faster than python. However, from wikipedia: "Of features found in C++ or Java, Go does not include type inheritance, generic programming, assertions, method overloading, or pointer arithmetic."
Ken Thompson is a co-creator, and the language came from Google. I think Google is just showing that they stand behind their language, and it does seem to hit a sweet spot for a lot of web apps. Although, I don't know too many web apps that need better performance than python.
- uriel 15y ago> However, from wikipedia: "Of features found in C++ or Java, Go does not include type inheritance, generic programming, assertions, method overloading, or pointer arithmetic." For many people (including me) the lack of all this "features" is a feature in itself. I certainly have not missed any of them.
- leon_ 15y agoI miss the occasional pointer arithmetic in string manipulations. But that's all I miss of the mentioned features.
- lars512 15y agoYou don't miss generics? In my limited time working with Go, the lack of generics felt like a glaring hole in the language. That said, maybe that feeling goes away as you spend more time with Go, and perhaps learn to program it more idiomatically.
- supersillyus 15y agoGo has generics, but only for the built-in chan, map, and slice types (and the associated operators). Since the majority of uses of generics (at least in my code) are from containers, this results in me not really feeling the lack too much. Interfaces and reflection cover most of the rest, though not ideally. After using Go for a while, I'm not yet sure if the lack of user-defined generics are a bug or a feature. It limits your expressive power a bit, yes, but it also makes the world so much simpler.
- uriel 15y agoBetween interfaces and the builtin generic types, I have never missed generics (specially since append() was added to the language), and that seems to be the experience of most people that have used Go for a while. Still it probably would be nice to have them some day, but it is worth doing right and not worth sacrificing the current simplicity and elegance of the language.
- jerf 15y ago"Although, I don't know too many web apps that need better performance than python." Web apps aren't just CRUD anymore. http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=go&lang2=python3 http://shootout.alioth.debian.org/u32/benchmark.php?test=all... If your server in Go is 10x faster than your Python server, which is not necessarily unreasonable, that's 10x less hardware expense you have, if your website is actually "doing something". That can add up.