Live data from Hacker News

What Golang Is and Is Not

danmux.com

41–50 of 279 posts

Re: What Golang Is and Is Not

#41

Earlier quoted context omitted.

> This is a huge improvement over Java, and something every language should have an option for. I am not sure what improvement you are talking about. Deploying Go apps requires recompiling for the target platform. On JVM, you only need to install the JVM. There are also tools to wrap JVM apps in executable files that will automatically download and install a suitable JVM.

I'm specifically talking about the classpath, jars, separate jvm install. These are a pain to manage across environments. I'm a longtime Java engineer, it's a great language, but I do think the compile once thing isn't as big an advantage anymore. With the advent of the LLVM, it's easy to target specific machines. rustup, even makes it possible to build binaries for every target environment you have. And let's be hon…

> I'm specifically talking about the classpath, jars, separate jvm install. These are a pain to manage across environments.

I agree with the classpath issue and hopefully it will be fix in Java 9. Separate jvm install? Why? JVM is backwards compatibility.

> And let's be honest, how many people target more than Linux/x86_64 on the server side.

Those that develop non server apps since Java is a general-purpose language.

Re: What Golang Is and Is Not

#42
post #37

> “There is nothing new under the sun” rings true in all languages since the 80’s. Really? Nothing? Sure a language like Rust has drawn from many other concepts in other languages, but it has done so while actually bringing high level features to a language that has zero overhead costs. But yes, it's not simple like Go. Did Go need to make all errors unchecked? There are no guide rails telling you that you forgot to…

What better language did you settle on?

Probably Rust.

Re: What Golang Is and Is Not

#44
post #23

So, Go is designed to be an engineering language and not an academic toy. Contrary to other languages, Go programmers "deliver" and have a pragmatic view of the real development world, not just their own commits. Go programmers need a deeper understanding of computer science because other programmers are lazy and have everything given for free and probably don't need to know how it works. A whole page discussing the…

Go doesn't make real world programming easier. It makes you work hard for pointless things. Most of its problems are from a lack of generics.

Yep. Add those and a proper type system and you have yourself a decent language. But when the creator of the language doesn't see the value in abstractions [0], then it's probably never going to happen.

[0] https://github.com/robpike/filter

Re: What Golang Is and Is Not

#45
The article mentions a keynote speech by Rob Pike* from 2012 which is quite illuminating. The trade-offs made were all centered around google-scale and the pain points of such a massive operation. It stands to reason that people working outside of that environment may be less pleased with the language.

[*] https://www.infoq.com/presentations/Go-Google

Re: What Golang Is and Is Not

#46
post #34

Earlier quoted context omitted.

>innovative feature of Go is the small runtime built into the binary making deployment dead simple and easy. Is rust the only good alternative here to golang if you one doesn't want to write c/c++ ?

There are many compiled languages with embedded runtimes. Haskell is among the best of them.

> haskell is among the best of them

There is little need for this kind of absolutism. Citing a haskell as one the best language in a contest where op ask about rust and c++ is dangerous.

To op : if your domain calls for modeling relatively 'type stable computation', and need strong correctness garanty, haskell is a great match.

Re: What Golang Is and Is Not

#47

Earlier quoted context omitted.

> This is a huge improvement over Java, and something every language should have an option for. I am not sure what improvement you are talking about. Deploying Go apps requires recompiling for the target platform. On JVM, you only need to install the JVM. There are also tools to wrap JVM apps in executable files that will automatically download and install a suitable JVM.

I'm specifically talking about the classpath, jars, separate jvm install. These are a pain to manage across environments. I'm a longtime Java engineer, it's a great language, but I do think the compile once thing isn't as big an advantage anymore. With the advent of the LLVM, it's easy to target specific machines. rustup, even makes it possible to build binaries for every target environment you have. And let's be hon…

Java is battle-hardened and has seen almost every situation in the business programming. Go has miles to go before it can even be eligible to be compared to Java in terms of productivity and maintainability.

Re: What Golang Is and Is Not

#48
post #30

Earlier quoted context omitted.

Go (the language) have at least two implementations: the official Go implementation and GCC (yes, Go is included in GCC, along with Fortran and Ada). The latest Go implementation (Go 1.7) has made Go a lot faster. I would argue that it closer the speed of executables generated with GCC (gcc/g++) than OpenJDK, the Oracle JVM, Mono or the .NET compiler for C#. Go (the language) can be made just as fast as C (the langua…

Until you have control over stack/heap and data locality you're never going to be able to approach C/C++/Rust speeds. Conversely if you're using C/C++ through a ton of heap/virtual pointers then you're losing a lot of the value the language brings and should be using something higher level.

Go allocates on the heap unless it can prove something doesn't escape, in which case it's on the stack. Not explicit programmer control, but I think you can reasonably make it do what you want.

Because it exposes pointers as a first-class concept, you also have good control of how data is laid out in memory (=> locality).

It's not like Python or Java where everything is a pointer and gets spread out all over memory.

Re: What Golang Is and Is Not

#49
post #40
post #12

Earlier quoted context omitted.

> There are no guide rails telling you that you forgot to check an error result. This is a runtime thing you need to discover. Is this actually simpler? This may be considered cheating since it isn't baked into the language but there are tools to do this at build time, here's one: https://github.com/kisielk/errcheck

There are lots of tools in Go that make up for issues people have with the language. Another example is the IDE macros people use for the standard if err != nil {} block.

> Another example is the IDE macros people use for the standard if err != nil {} block

Which doesn't make code easy to read when there are 10th of these blocks in a single function.

Re: What Golang Is and Is Not

#50
I'm not much of a Go programmer but I would definitely regard Go's multiple return and error handling (save the 'no assertions' clause) as very cool. I'm not sure if any other languages have experimented with that approach before the rise of Go, but to me at least it appears much saner than the prevalent ridiculousness of exception handling.
Post reply on HN