Live data from Hacker News

Why Go is doomed to succeed

texlution.com

211–220 of 330 posts

Re: Why Go is doomed to succeed

#212

Earlier quoted context omitted.

I have never used Go before. From the sound of it, it looks like Go hits a sweet spot between C and Java? and of course the Google support is a major factor for a possible success.

Not quite. To understand Go, you need to understand the history of the Bell Labs gurus somewhere around the late 9th and 10th editions of Research Unix, when the vestiges of what would become Plan 9 and Inferno began to take shape (the sam editor that would influence acme, the rc shell, mk and the predecessor to 9P [streams] would all originate here - see "Interprocess Communication in the Ninth Edition Unix System"…

To be fair, there is still mediocrity left in computing.

Re: Why Go is doomed to succeed

#213
post #17

> To understands why Go is the way it is you need to know why it came to exist in the first place: "The goals of the Go project were to eliminate the slowness and clumsiness of software development at Google, and thereby to make the process more productive and scalable. The language was designed by and for people who write—and read and debug and maintain—large software systems. source" The problem with this idea is t…

The problem with all statements regarding programming languages is that they rarely have empirical evidence to back them up. Do you have any data showing that generics will lead to a cleaner language? I have seen a study or two that tried to measure productivity, bug counts, etc with regards to generics and what it showed was that writing code using a library that is built with generics was ever so slightly faster. However, it showed that creating or editing a library that used generics took 10x longer.

It seems that you can't really make the claim that adding generics leads to a "much cleaner language".

Re: Why Go is doomed to succeed

#214

Earlier quoted context omitted.

> C++ is too complex, too unsafe, and too hard to maintain, and Python is too slow. (Remember that "slow" at that scale means "we have to add another acre of servers.") Which is why Java gets used instead.

Often Java is too slow too. (Slow == overhead from GC of unwanted object metadata and heap allocated objects)

In those Techempower benchmarks Java destroyed Go for web app style requests.

And given that the JVM is so dominant in big data (e.g. Spark, Storm), online betting and applications like high frequency trading you could make the reasonable assumption that Java is anything but slow.

Re: Why Go is doomed to succeed

#215
post #25

Earlier quoted context omitted.

I have never used Go before. From the sound of it, it looks like Go hits a sweet spot between C and Java? and of course the Google support is a major factor for a possible success.

"Between C and Java" hits it very well, I'd say. When I jumped ship from C to Java, Java's object orientation wasn't exciting to me, and its exception handling is an acquired taste. But dynamically growable, garbage collected buffers are something I'd missed for a long time. And the simple ability to concatenate strings without first reserving space for the result. Oh, and hash maps! Remarkably versatile data structu…

Exception handling may be an acquired taste.

But it is infinitely better tasting than Go's ridiculous error handling which is something you would expect in the 1980s.

Re: Why Go is doomed to succeed

#216
post #166
post #25

Earlier quoted context omitted.

"Between C and Java" hits it very well, I'd say. When I jumped ship from C to Java, Java's object orientation wasn't exciting to me, and its exception handling is an acquired taste. But dynamically growable, garbage collected buffers are something I'd missed for a long time. And the simple ability to concatenate strings without first reserving space for the result. Oh, and hash maps! Remarkably versatile data structu…

>And the simple ability to concatenate strings without first reserving space for the result Not exactly the same thing, but routine string manipulation in C gets considerably easier once you discover a highly underrated function called asprintf (basically combines sprintf and malloc, calculating the buffer size for you).

Woo hoo, thanks for the tip!

But I still need to worry about creating a memory leak with this. :(

Re: Why Go is doomed to succeed

#217
post #142

Earlier quoted context omitted.

Only for small values of "all." The magic of concatenation and auto-conversion of strings that's baked into the Java compiler and, to a lesser extent, the Go compiler, is missing in C++ - not vital but convenient. Similarly, hashmaps, while built directly into the language in Go, are a library class in C++. Finally, garbage collection will likely never be part of C++.

It has garbage collection through shared_ptr.

Not sure if you are serious but the hard part of gcs is resolving and identifying cycles. Cycles with shared pointers are just leaks.

Re: Why Go is doomed to succeed

#218
post #203

It's very clear what Go is for. Go is for the kind of stuff Google runs on their servers. C++ is too complex, too unsafe, and too hard to maintain, and Python is too slow. (Remember that "slow" at that scale means "we have to add another acre of servers.") Go is an OK language for server-side stuff. It's not perfect. The concurrency isn't as airtight as its proponents originally claimed. Reflection and type "interfac…

> Rust is for people who debate language semantics on > Lambda the Ultimate and program in Haskell for fun. Go > is for people who have a job to do. This is a mischaracterization of Rust to the point of incredulity. I've been talking to companies experimenting with Rust and all the engineers I've spoken to have praised Rust for its ability to let them do their jobs with confidence. These engineers are in domains wher…

I never heard that phrase "thread the needle" before that's good

Re: Why Go is doomed to succeed

#219
post #142

Earlier quoted context omitted.

Only for small values of "all." The magic of concatenation and auto-conversion of strings that's baked into the Java compiler and, to a lesser extent, the Go compiler, is missing in C++ - not vital but convenient. Similarly, hashmaps, while built directly into the language in Go, are a library class in C++. Finally, garbage collection will likely never be part of C++.

What do you mean by "the magic concatenation and auto-conversion of strings"? Also, having a map implemented in a library is a Good Thing. It means that your language is extensible and expressive enough for this. AFAIK Go is - by design - not that extensible.

Magic concatenation: the "+" operator is understood by the compiler to be the concatenation operator if either operand is a String. "Magic" in the sense that it's an exceptional affordance made by the language (not the library) for this one data type and operator.

Auto-conversion: "2" + 5 = "25". This looks horribly hackish, like some type buggering perl might do, or js. But it comes in handy when you want to build a message string.

And yes, as the article tells us, a lot of things are very purposely left out of Go, which has advantages and disadvantages like most trade-offs.

Re: Why Go is doomed to succeed

#220
post #20

Earlier quoted context omitted.

Someone correct me if I'm wrong but I think not using the JVM makes deployments much simpler. At least that was one of the benefits a team at Amazon stated about switching to Go while I was there

In practice, it doesn't make much difference. You install the JVM once and rarely upgrade it. You build and distribute your Java apps as fat jars (meaning, all dependencies bundled.)

But what happens when some of the apps require different versions of the JVM?
Post reply on HN