Live data from Hacker News

The March Towards Go

zef.me

61–70 of 217 posts

Re: The March Towards Go

#61
This sums up the problem:

> Not looking at Go yet? It may be a good time to do so now — everybody else is.

That's going to be a large albatross around Go's neck, as it has been around node.js', and Rails before that. Large amounts of developers flocking to a new thing because "this is the thing to use now and if you don't you're dead meat".

Personally, I thought Node.js was a terrible platform for serving dynamic web sites. It is, however, a great platform if you need to make a reasonably performant general server with minimal effort (such as a message broker for example).

Likewise, people will now order their projects in Go whether it makes sense given the requirements or not. 20 years of Go experience will be needed on CVs. And when Go inevitably fails at certain things, "everybody" will move to the next thing - probably Rust, thereby completing the migration away from dynamic scripting.

This is not reasonable, is it?

Re: The March Towards Go

#62

"In the past week I’ve rewritten a relatively large distributed system in Go" Maybe I don't have any programming talent at all, but I cannot even imagine to rewrite a 'large distributed system' in a week. The not-too-large distributed systems I worked with had years of thinking behind them, I could not even type in the characters of the code in a week.

It is a rather vauge statement and could have used some clarification; however Go does make writing network protocols very simple, and building something like a gossip protocol based system with a leader election system is doable in a week. Even quicker if you use some of the existing distributed systems libraries for Go.

What does Go do that makes writing network protocols simple?

Re: The March Towards Go

#63
post #43

Earlier quoted context omitted.

I dunno, I tried installing snap, yesod and happstack (the three top web frameworks apparently) about a month ago and after about 20 minutes of compiling all failed to install (some had missing packages, others had the packages but they failed to build). I'm running a no-frills MBP with bash, which I would imagine is a fairly popular dev environment. All I want to do is serve an HTTP request.

I think you should figure out what's going on with with your dev environment and go with Haskell. Are you using the Haskell platform? If so I would ditch that and make sure to install everything in a sandbox, I've had very little trouble with cabal since I went with just cabal + sandboxes. I'm on linux but Chris Allen's guide has instructions for a minimal OSX install: https://github.com/bitemyapp/learnhaskell If non…

OK, you gave me the encouragement to try it again.

I ran into a bunch of bugs getting haskell platform set up correctly on OSX (wouldn't remove my old version, had to manually remove GHC, also reported this one https://github.com/haskell/cabal/issues/1980) but after reinstalling Haskell platform it seems to be working better. Thanks.

Re: The March Towards Go

#64
post #11

Earlier quoted context omitted.

Scala? Strong static types, lots of quality libraries both for Scala and 'inherited' from Java. Fits well among the languages you already mention.

Nice. I've heard some complaints about compile times -- are they founded?

Scala 2.12 will have a new compiler backend which should speed things up considerably. [1]

Other than that, as an avid Scala fan, I've been long wondering why people favour Go so much. Arguably, if you've started out with RoR, then Node.js was a great improvement (dynamic typing with awesome speed). Then came Go, which solves many of the issues you tend to encounter with Node.js. So now, after it has reasonably matured, many people are pivoting to it. Scala, while having a rather "bloated" core library (i.e. quite exhaustive), already does most that Go does (i.e. an Actor is reasonably close to a goroutine etc.) and has an awesome type system. But then, I'm biased and YMMV ;)

[1] https://magarciaepfl.github.io/scala/

Re: The March Towards Go

#65
post #60
post #19

Earlier quoted context omitted.

No generics (parametric polymorphism), no algebraic data types. You should learn some Haskell or Ocaml even if you don't plan on using it in production. Go's type system is weak. Edit: I don't think there's anything like type classes either but I'm not 100%.

> Go's type system is weak. It is strong enough for me. I see the lack of algebraic data types and type classes as a feature, honestly. It means I can learn the things I need and start working in 2 days instead of in 2 weeks or a month. I sometimes need generics, but not frequently enough to miss them. You think Go's type system is weak. I think Haskell's type system is overcomplicated. So, there.

Even if it were true that it were overly complicated, that wouldn't change the fact that it's much more powerful than Go's.

“When I work at this system up to 12hrs a day, I’m profoundly uninterested in what user interface a novice user would prefer.” —Erik Naggum

Are you using visual basic because you could pick it up in 2 days instead of taking a month to learn Go?

It's easy to learn because it doesn't do anything interesting that you're not already familiar with. If you're not missing them, you're missing out on simple beautiful abstractions like map and filter. You're also missing out on type safe libraries for containers. It's not possible to write a generic container without casts to interface{}, which is a shame imo.

Re: The March Towards Go

#66
post #60
post #19

Earlier quoted context omitted.

No generics (parametric polymorphism), no algebraic data types. You should learn some Haskell or Ocaml even if you don't plan on using it in production. Go's type system is weak. Edit: I don't think there's anything like type classes either but I'm not 100%.

> Go's type system is weak. It is strong enough for me. I see the lack of algebraic data types and type classes as a feature, honestly. It means I can learn the things I need and start working in 2 days instead of in 2 weeks or a month. I sometimes need generics, but not frequently enough to miss them. You think Go's type system is weak. I think Haskell's type system is overcomplicated. So, there.

Go's type system being weak is a factual statement. Haskell's type system being overcomplicated is an opinion.

One might prefer a weak type system over a strong type system, but that's a different discussion. The parent clearly expressed that he wants a static strong type system.

Re: The March Towards Go

#67

Zef writes this as if it's completely amazing that people are leaving Node for Go. Node is based on JavaScript. There are arguably more things wrong with JavaScript than with any other popular programming language, as evidenced by book titles like "JavaScript, the good parts". This is common knowledge; we're all trying to do good work despite JavaScript, seldom because of it. So Node: it's fast, we can share code wit…

What part of the article did you read as "Go is a silver bullet? I read it as a list of articles about people/companies who are switching to Go with each giving their reasons for adoption.

Re: The March Towards Go

#68
post #55

TL;DR It is very likely that TJH is a hive mind. FYI some question TJ Holowaychuk's 'person.' A glance at his github commits would lead you to believe he is some open source prodigy, but there is a curious case being built (share=1 trick, no Quora login needed): http://www.quora.com/TJ-Holowaychuk-1/How-is-TJ-Holowaychuk-...

Lol, he works at segment.io and he is very much one person.

Re: The March Towards Go

#69

Earlier quoted context omitted.

You're missing that OCaml isn't stuck in 1999. OCaml now has an excellent package manager, cool new features, lots of system libraries, and a growing community. What do you find out-dated about it? Check out http://www.realworldocaml.org

I want to serve a JSON response over HTTP, preferably from a standalone server (like django etc). Later I want to talk to Postgres and memcached. Do I use this thing? http://ocsigen.org/ocsigenserver/ All the docs either don't do what I'm looking for (i.e set up a web server to serve some static files) or are broken links! OCaml is actually what I'd prefer to use (since I had a blast with SML/NJ) I'll check out that…

I think all the pieces are there to do that (e.g. cohttp, yojson, atdgen, PG'OCaml), although perhaps not in a single easy to use framework.

Maybe http://rgrinberg.com/blog/2014/04/04/introducing-opium/ is relevant.

Re: The March Towards Go

#70
post #3

I don't understand why people like go. It seems to be missing a lot of features and be pretty ugly and painful. I guess compared to javascript I can see the advantages though

I tried to like Go. I was allured by the native compilation and quite low memory footprint while still being quite high level, but I just can't. I can't stand it forces you to use K&R style. I can't stand the verbose error handling. I can't stand the inconsistency in the built-in types and libraries. I hate that unused variables and imports are a compile error which is just stupid and kills all the fun in programming. To me Go feels like a reincarnation of Fortran 77 with all the restrictions it imposes. There are some good and cool things about Go, no doubt about it but it many places it's just too cumbersome which is unforgivable in this day and age.
Post reply on HN