4 ms·
I personally love Rust and think Rust is the future for C and C++, and use it professionally. But Go is simple, fun, fast, and easy to read and frankly more app
by ilovecaching 8y ago
I personally love Rust and think Rust is the future for C and C++, and use it professionally. But Go is simple, fun, fast, and easy to read and frankly more approachable by the people many companies can afford to hire.
I view language choice as a line. If I need to build big, or build niche, or build fast, I use Rust. But if it’s general purpose I use Go. I can write Go faster than I can write Python because the type system gives me a fast feedback loop and the language is simple and builds in the common case building blocks. I can get better performance and understand my app better than with the JVM because it’s compiled ahead of time and I already know the ins and outs of Linux. There is no black box JVM that consumes resources while idling.
Go has advanced the state of formatting, documentation, and revitalized the Unix philosophy of building small, focused pieces without getting caught in the clouds over abstracting.
If you are currently using a Python, Java, C#, or JavaScript, Go is better. Just don’t post angrily to your blog until you’ve written Go while also embracing its philisophy and taking the time to understand the authors intentions.
- therein 8y agoAgreed. It is probably also the perfect introductory language to introduce someone to programming with while also being extremely useful even for complex programs. I think an intro to CS course would be a lot more fun for everyone involved if it were taught in Go rather than Java like it did in back in my college just half a decade ago.
- winterismute 8y agoDo you/anybody know of any solid project that aims at porting/re-developing in Go at least some of the statistical learning tools that we have in python? I did not find much when I looked last time, but it might have been more than a year ago.
- blub 8y agoGo is at this point used for tools and containers. Maybe back-ends. Trying to use it for data science is a waste of ones time, the language is particularly poor at expressiveness. Any of the allegedly worse languages above (C#, Java, Python) are better at this.
- rakoo 8y agoGo is definitely worse both in expressiveness and in numerical manipulation, so I'd say data science is the last field you want to use Go in. And I sat that as a practitioner of the language.
- jerf 8y agoThere's gonum: https://www.gonum.org/ https://www.gonum.org/ However, I endorse the view that Go in its current form is a poor choice for that task, and that even after generics are added to Go, that will merely make it an at-best-average choice for that task, and personally, if that's my primary goal, I'd want to choose something excellent at that task. The design decisions made in Go tend to cut actively against heavily mathematical usage. For instance, I agree that no operator overloading is the right choice for a systems language, but it's a terrible choice for a math language.
- SeanDav 8y agoWhere does Windows development fit into the Go way of doing things? Is Windows a first class citizen for Go? Python, Java, C#, C, C++ are all very well supported in Windows. P.S. I don't have any hidden agenda with this comment - genuinely curious.
- networkimprov 8y agoThere's no API for GUI in the stdlib. There are several third party options.
- laumars 8y agoWindows is very much a first class citizen - just so long as you're writing CLI tools or web services. Unfortunately writing native GUIs in Go is something that isn't well supported - irrespective of the host platform you're targeting.
- MrBuddyCasino 8y agoIf you are currently using Go, Kotlin is better. Just don’t post angrily to your blog until you’ve written Kotlin while also embracing its philosophy and taking the time to understand the authors intentions.
- Const-me 8y ago> using a Python, Java, C#, or JavaScript, Go is better. I’m not sure about C#. If I saw that comment couple years ago, I would mostly agree. But with modern .NET, first-party Linux and OSX support has arrived. Also better performance, because spans, value tuples, and other modern stuff that was the main reason why .NET core diverged from slower evolving Windows-only .NET framework. The runtime is deployed with a single tar -xvf command and is quite small, e.g. for ARM Linux the gzip is 12MB. Async-await style IO is comparable to goroutines. Multithreading is similar. GC is not as bad as in JVM, in part because value types don’t use GC. The language is higher-level and more expressive, with generics, LINQ, metaprogramming, etc. The amount of third-party libraries useful for network services and similar things is quite comparable.
- deleted 8y ago[deleted]
- MaxBarraclough 8y ago> I can get better performance and understand my app better than with the JVM because it’s compiled ahead of time Ahead-of-time compilation does not mean better performance. Java HotSpot has a history of outperforming .Net, despite the latter using ahead-of-time compilation. Similarly, various JVMs use ahead-of-time compilation, but are generally unable to outperform HotSpot. Java's performance pitfalls are in areas like its slow reflection (or rather, in the way reflection is overused in Java libraries), its costly runtime checks for null and out-of-bounds array access, and boxing of primitive types.