Live data from Hacker News

The March Towards Go

zef.me

21–30 of 217 posts

Re: The March Towards Go

#22
post #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.

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

Re: The March Towards Go

#23
post #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 fi…

We, CloudFlare, write a lot of new stuff in Go. It works well for our use model: highly-concurrent networked stuff.

I've just been rewriting a thing that was in a monstruous mixture of PHP/Python into a single Go program.

Re: The March Towards Go

#24
post #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.

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.

Re: The March Towards Go

#25
post #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…

The hundreds of high quality Go packages that do handle errors are an existence proof against your argument. Look at nearly anything on godoc.org.

You didn't cite that quote. I am certain whoever said it is doing something silly.

Re: The March Towards Go

#26
post #19
post #13

Earlier quoted context omitted.

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

Yeah, I mainly want to get a feel for building a real system using a strict type system and algebraic data types. I've done some toys with them but nothing real yet.

Re: The March Towards Go

#27
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?

I suppose you rebuild and redeploy everything.

Re: The March Towards Go

#28
post #19
post #13

Earlier quoted context omitted.

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

Would you consider JavaScript's type system strong?

Re: The March Towards Go

#29
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...

This blog post misses a very good Python replacement, namely Nimrod (http://nimrod-lang.org).

Re: The March Towards Go

#30

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

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 book, thanks! But I did just skim the ToC and it has nothing about serving HTTP. Serving HTTP is like my #1 use case for anything these days :/

Post reply on HN