Live data from Hacker News

Why We switched from Python To Go

medium.com

61–70 of 79 posts

Re: Why We switched from Python To Go

#61

Earlier quoted context omitted.

> It's really weird to see one of the reasons for their switch to Go was because it's a statically typed language. If you want static typing, you don't choose Python in the first place. You know it beforehand and it shouldn't come as a surprise for you. It's weirder that many Python/NodeJS switchers cite this reason, since out of all the commonly used statically typed languages, Go has the second weakest type system…

If you really want good static typing while being fairly python like, there are other great options. Java or c++ both have decent generics, speed comparable to go, great libraries and years of collective experience using them. I truly hate the social hacks that are causing go to displace much better languages.

> much better languages.

I disagree. Java has a bloated syntax, and C++ is a mess. Java also depends on a proprietary runtime, with mostly compatible free alternatives.

The biggest advantage C++ offers is speed, through memory management, which is usually a pain to deal with.

Go, on the other hand, has a well thought out syntax, good support for concurrency, garbage collection, and compiles to native executables.

Re: Why We switched from Python To Go

#62
post #52

Earlier quoted context omitted.

It's the learning curve. If you know another imperative language, you can grasp golang in a week. With C++ or Java, you need months.

Java is pretty darned graspable, at least I think it's way closer to Go than C++. What do you think are the biggest things that make it hard? The language? Warts like int/Integer? Library size or organization? (This is a real question, I can't look at this stuff with "fresh eyes.")

For me? The environment/runtime.

I can write a simple program in C/C++/go/rust/etc, and compile and run it.

In Java, a bloated IDE isn't just a recommendation, it's practically a requirement.

Evey time I try to learn Java, I smack my head against the toolchain. I ended up just giving up when I tried to wrap my head around classpath, and haven't tried since. I could probably figure it out pretty easily now, but I just don't see any allure in learning Java anyway.

One of these days, I might start using Clojure, but the JVM just feels so messy that I don't want to start.

Re: Why We switched from Python To Go

#63
post #14

Earlier quoted context omitted.

About the static type system: When people say they like Go's static type system sometimes they are comparing it to something more verbose like Java. Think about someone that knows Python and have to use Java, then they think that all static type languages are as a pain in the ass. So they begin disliking static type systems when they really just hate the Java's one. And so the moment they are using Python and start p…

Java the language is verbose, sure... but the type system?

Inferred types are nice.

They make cleaner, and therefore, more readable code. That is the main thing people want from dynamic typing anyway. It's really not very common to change the type of a variable, and a statically typed codebase is more predictable, and therefore easier to manage.

Re: Why We switched from Python To Go

#64

Earlier quoted context omitted.

Java is pretty darned graspable, at least I think it's way closer to Go than C++. What do you think are the biggest things that make it hard? The language? Warts like int/Integer? Library size or organization? (This is a real question, I can't look at this stuff with "fresh eyes.")

For me? The environment/runtime. I can write a simple program in C/C++/go/rust/etc, and compile and run it. In Java, a bloated IDE isn't just a recommendation, it's practically a requirement. Evey time I try to learn Java, I smack my head against the toolchain. I ended up just giving up when I tried to wrap my head around classpath, and haven't tried since. I could probably figure it out pretty easily now, but I just…

There is no requirement to use an ide in Java. I've never written Java in anything other than emacs and never had a problem.

Re: Why We switched from Python To Go

#65

Earlier quoted context omitted.

If you really want good static typing while being fairly python like, there are other great options. Java or c++ both have decent generics, speed comparable to go, great libraries and years of collective experience using them. I truly hate the social hacks that are causing go to displace much better languages.

> much better languages. I disagree. Java has a bloated syntax, and C++ is a mess. Java also depends on a proprietary runtime, with mostly compatible free alternatives. The biggest advantage C++ offers is speed, through memory management, which is usually a pain to deal with. Go, on the other hand, has a well thought out syntax, good support for concurrency, garbage collection, and compiles to native executables.

Could you illustrate what you mean by "bloated syntax"?

Everything else you mention (besides native executables) Java also has. From what I can see, Java provides far better concurrency support - more paradigms than simply go routines.

Re: Why We switched from Python To Go

#66

Earlier quoted context omitted.

For me? The environment/runtime. I can write a simple program in C/C++/go/rust/etc, and compile and run it. In Java, a bloated IDE isn't just a recommendation, it's practically a requirement. Evey time I try to learn Java, I smack my head against the toolchain. I ended up just giving up when I tried to wrap my head around classpath, and haven't tried since. I could probably figure it out pretty easily now, but I just…

There is no requirement to use an ide in Java. I've never written Java in anything other than emacs and never had a problem.

I'm likely overstating the problem, but that is my experience as I remember it.

My main point is that Java just isn't appealing enough in the first place for me to want to deal with the relatively insignificant issues I ran into.

Re: Why We switched from Python To Go

#67

Earlier quoted context omitted.

> much better languages. I disagree. Java has a bloated syntax, and C++ is a mess. Java also depends on a proprietary runtime, with mostly compatible free alternatives. The biggest advantage C++ offers is speed, through memory management, which is usually a pain to deal with. Go, on the other hand, has a well thought out syntax, good support for concurrency, garbage collection, and compiles to native executables.

Could you illustrate what you mean by "bloated syntax"? Everything else you mention (besides native executables) Java also has. From what I can see, Java provides far better concurrency support - more paradigms than simply go routines.

Classes are required. Sometimes I just want a c-style program without a class. Java looks a lot like C++ (just with garbage collection, and some more consistently defined behavior). In comparison, golang (and rust) have some nice syntactical differences: inferred types, postfix type annotations, etc.

Go routines are nice when that is all the complexity you want. Having more paradigms isn't an interesting prospect until it becomes specifically useful.

Java may be more usable in many cases, but it, in my experience, just isn't easy to work with.

Re: Why We switched from Python To Go

#68

Earlier quoted context omitted.

Could you illustrate what you mean by "bloated syntax"? Everything else you mention (besides native executables) Java also has. From what I can see, Java provides far better concurrency support - more paradigms than simply go routines.

Classes are required. Sometimes I just want a c-style program without a class. Java looks a lot like C++ (just with garbage collection, and some more consistently defined behavior). In comparison, golang (and rust) have some nice syntactical differences: inferred types, postfix type annotations, etc. Go routines are nice when that is all the complexity you want. Having more paradigms isn't an interesting prospect unt…

Apart from the boilerplate enclosing class (4 lines, vs 2 in C), you can write a C-style program without classes in Java. There is literally nothing stopping you and generics are helping you significantly for this.

Re: Why We switched from Python To Go

#69
If someone switches away from Python he never used the unprecedented expressiveness of it, which is tens of orders of magnitude higher than the next best language.

One line in Python is worth several screens in the next best language.

Python can be as fast as C++ if you use all its features.

Development time is around 20 to 50 times faster than Java.

Re: Why We switched from Python To Go

#70

Earlier quoted context omitted.

Classes are required. Sometimes I just want a c-style program without a class. Java looks a lot like C++ (just with garbage collection, and some more consistently defined behavior). In comparison, golang (and rust) have some nice syntactical differences: inferred types, postfix type annotations, etc. Go routines are nice when that is all the complexity you want. Having more paradigms isn't an interesting prospect unt…

Apart from the boilerplate enclosing class (4 lines, vs 2 in C), you can write a C-style program without classes in Java. There is literally nothing stopping you and generics are helping you significantly for this.

That's completely true, but I just don't like the boiler plate. It's not hugely important to the grand scheme of things, but the more barriers I have from writing a function to running code, the less I want to deal with the toolchain/language in the first place.
Post reply on HN