Live data from Hacker News

The March Towards Go

zef.me

11–20 of 217 posts

Re: The March Towards Go

#11

I want Go but with a really strong static type system. What do I use? Haskell's Hackage seems to be full of broken packages. OCaml seems to be stuck in 1999. F#/Mono is pretty great, but tough to find quality libraries that work with the tools I use (postgres etc) Anything I'm missing?

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

Re: The March Towards Go

#12
post #4

Go may well be better for many apps than js or C++, but there are other languages out there. If you're looking for a new language it's worth considering more possibilities, e.g. see http://roscidus.com/blog/blog/2013/06/09/choosing-a-python-r...

Incidentally, your link includes a great example of Go's error handling - which is inevitably what actually happens in languages without exceptions: errors are silenced and the program marches on, each step making less sense than the previous. It's a good talking point that you can always check error values - but it never really happens, in part because library designers try to avoid putting the burden on themselves and their users:

"Getenv returns the empty string and continues. Then Go somehow manages to parse the empty string as an empty JSON list and still continues. Then it tries to interpret the first of the user arguments to the program as the path of the program to run and execs that instead! Utter failure."

I happened to write about it just before Go came out here: http://yosefk.com/blog/what-makes-cover-up-preferable-to-err...

It seems that having exceptions in the language is a great predictor for libraries/built-ins barfing upon bad input vs silently producing garbage (as in JS's "undefined" string produced from undefined values and propagated, or Go's behavior above, etc.) For instance Lisp's NTH produces garbage and it predates Lisp's exception handling features whereas AREF was added later and indeed complains loudly, etc.

Re: The March Towards Go

#13

I want Go but with a really strong static type system. What do I use? Haskell's Hackage seems to be full of broken packages. OCaml seems to be stuck in 1999. F#/Mono is pretty great, but tough to find quality libraries that work with the tools I use (postgres etc) Anything I'm missing?

As far as I know, Go already has a really strong static type system (int32 cannot be assigned to int for example). Which parts are weak?

Re: The March Towards Go

#14
I've often heard that Go founder were surprised that Go seemed to replace python more than C++ or C which were the initial targets. By judging from the given examples it seems that it isn't the case : people seem to come to Go when they start looking for performance. Instead of writing C modules and using them from python, they just switch everything to Go.

I'd be curious to know how many start ups prototype their first software version with Go.

Note : as a coder that writes a lot of python, seing dropbox switch to Go in parallel to python so often having toxic discussions about python 3 vs 2 is really painful.

Re: The March Towards Go

#15

I want Go but with a really strong static type system. What do I use? Haskell's Hackage seems to be full of broken packages. OCaml seems to be stuck in 1999. F#/Mono is pretty great, but tough to find quality libraries that work with the tools I use (postgres etc) Anything I'm missing?

> full of broken packages.

Citation needed. Hackage goes to great lengths to validate packages as much as possible. Other support systems do continuous integration and further validation, if you're looking for well regarded package subsets.

Maintaining 6000+ open source packages is a pretty serious task.

Re: The March Towards Go

#16
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

> missing a lot of features

Not a lot of them - just some. And the missing ones, a lot of people don't miss anyway.

It also has things others languages don't - fast compilation, a big company behind it (while staying opensource), and simplicity.

> be pretty ugly and painful

Subjective. I like how it looks and have no pain.

> compared to javascript I can see the advantages though

It is not just "better than javascript". It is as expressive as ruby or python, with as much type safety as possible without giving up clarity or speed. And its type system doesn't require weeks to wrap your head around it.

Re: The March Towards Go

#17
post #5

> Statically linked binaries make for easy deployment They certainly do, but have we solved the problem of statically linked bugs yet? What happens when the next heartbleed happens?

How many people updated their libssl packages without restarting the server processes, thinking they're safe when they really aren't?

With a bug in such a central place you'll have to touch everything - could as well rebuild everything, when your processes are prepared for it.

Re: The March Towards Go

#18
post #13

I want Go but with a really strong static type system. What do I use? Haskell's Hackage seems to be full of broken packages. OCaml seems to be stuck in 1999. F#/Mono is pretty great, but tough to find quality libraries that work with the tools I use (postgres etc) Anything I'm missing?

As far as I know, Go already has a really strong static type system (int32 cannot be assigned to int for example). Which parts are weak?

I assume they meant strong as in 'good' - presumably they're talking about generics.

Re: The March Towards Go

#19
post #13

I want Go but with a really strong static type system. What do I use? Haskell's Hackage seems to be full of broken packages. OCaml seems to be stuck in 1999. F#/Mono is pretty great, but tough to find quality libraries that work with the tools I use (postgres etc) Anything I'm missing?

As far as I know, Go already has a really strong static type system (int32 cannot be assigned to int for example). Which parts are weak?

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%.

Re: The March Towards Go

#20

I want Go but with a really strong static type system. What do I use? Haskell's Hackage seems to be full of broken packages. OCaml seems to be stuck in 1999. F#/Mono is pretty great, but tough to find quality libraries that work with the tools I use (postgres etc) Anything I'm missing?

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
Post reply on HN