Live data from Hacker News

Why I went from Python to Go (and not node.js)

orel.li

111–120 of 202 posts

Re: Why I went from Python to Go (and not node.js)

#111
post #90

"... as a Python programmer, I was the member of an elite cabal of superhuman ultranerds, smarter than those childish Rails/JavaScript/PHP/whatever developers that couldn’t write a bubble sort or comprehend even basic algorithmic complexity, but more in touch with reality than the grey-bearded wizards of Lisp/Haskell/whatever that sat in their caves/towers/whatever solving contrived, nonexistent problems for people t…

"Everyone less nerdy than me is stupid and everyone more nerdy than my is a no-life". I think it's pathetic, not funny.

I read that quote from the article as essentially self-pardoying. The author is essentially making fun of himself and the general attitude he--and other Pythonistas, I imagine--held.

Then again, maybe I'm reading too much into it. For the record, I think Haskell is a strictly superior choice to Go, so I'm what he would probably call "gray-bearded" :P. (And I'm certainly working on a beard, even if it shouldn't be gray any time soon.)

Re: Why I went from Python to Go (and not node.js)

#112

Earlier quoted context omitted.

Agreed. I think we, as a profession, have a tendency to focus on what's "easy" (syntax and constructs we're already familiar with) to the exclusion of other, potentially more important factors. I am and have been guilty of this myself, so I'm not claiming any sort of sainthood, just making an observation. Often people pick on the use of single-letter variable names as "unreadable." This is mostly a matter of keeping…

I think the issue with single-letter variables goes deeper than it just being unreadable (although its that too for someone that isn't "used to it"). For example there are issues with scope (what happens when I need a second or third "f" variable" and maintainability too (6 months from now I have to remember if "f" stands for "foo" or "file").

You can look at the method signature that accepts or returns f. At worst case, you need an IDE with hover popups, or to open the functions doc page or source code.

Re: Why I went from Python to Go (and not node.js)

#113

Earlier quoted context omitted.

"For me, Go's major shortcoming is its community's lack of focus on readability as compared to Python." Can you be a bit more concrete here? Because whether you like the code styles enforced by gofmt and the compiler itself or not, Go is the most consistently readable language I've ever used (once you adapt yourself to the language). IMO, this seems like an especially odd problem for someone to have with Go.

I can't speak for @ak217, but for me Go hits a bad spot on "expressibility". Some of the nuances of static typing are mitigated a bit with features, yes, like the type inference on local variables, or the automatic interface detection (i.e. no explicit "type X implements Y"). But overall, i think the chosen type system is lacking on expressibility. Having no parametric polymorphism in a static language is a deal brea…

You can use reflection to get parametricity. Python doesn't have type safe anything, so Go bests Python on that front.

Re: Why I went from Python to Go (and not node.js)

#115
post #107

Earlier quoted context omitted.

It's actually kind of bizarre that so many Pythonistas actually have the kind of attitude that the article mocks, since Python is a thoroughly mediocre language. I can only attribute their patronizing disposition to a lack of genuine awareness of the broader programming world.

since Python is a thoroughly mediocre language. Care to elaborate?

Is there anything to add? It's not very fast. It does not have any interesting abstraction. It doesn't push the envelope further. It doesn't allow any clever optimizations. It has a bunch of horrible gotchas (scoping, mutable default arguments, tuples of one element...). It isn't elegant--the grammar alone takes pages and it's just a loose collection of mostly orthogonal features with largely arbitrary (but, admittedly, readable) syntax. It is fairly verbose and writing most anything takes more than one line. It pretends to support functional programming, but only grudgingly and never well. It has OO support, but also rather half-heartedly compared to Self or Smalltalk. It has a completely arbitrary and unnecessary delineation between statements and expressions (this one really annoys me).

In short, it's a language best define by what it isn't: it isn't bad, but it also isn't good.

It isn't particularly elegant, but it isn't particularly ugly either. It isn't exceptionally expressive, but it's also no tarpit. It isn't very concise, but it isn't quite overly verbose.

It is the very essence of plainness. If languages had a color, Python's would be a dull gray.

An interesting thing to note is which communities do not like Python. For what it's worth, the least Python-endorsing site I've found is Lambda the Ultimate. That should definitely tell you something, although I suspect what it tells you depends entirely on your own preferences :P.

Python really is nothing but mediocre and uninspiring. Sure, it isn't bad, but I would like a language that is actively good.

The very interesting thing about all this is that, quite often, you need a mediocre language. So Python is actually a great fit for a bunch of startups--it's the modern lowest common denominator. But I--being deeply interested in programming languages--wouldn't want to work anywhere that settled on a language that way.

Re: Why I went from Python to Go (and not node.js)

#116
post #38

Earlier quoted context omitted.

The perception out there is that Haskell is an academic language, also that it is a "difficult" language. This is not fair on Haskell but that is what people think and that really is the issue that Haskell has to overcome.

Honestly, I find Go more difficult than Haskell

Go look at the Haskell code dons has written and come back and confirm or cancel your claim. Hint: dons studies Core to get the great performance his code achieves.

People like dons can do amazing work in Haskell. There at 10x or 100x as many people who can't (not without at least a PhD's worth of study at least), but could be productive in Go on a large array of projects they need to do.

/Studied haskell, hung out on #haskell, thinks its awesome, made me a better java programmer, but always gets blocked on showstoppers due to not knowing the incantations and deep type theory needed to structure a program for high performance and debug space leaks.

Re: Why I went from Python to Go (and not node.js)

#117
post #92

Earlier quoted context omitted.

After you've learned both, maybe. But that is beside the point. Haskell is more difficult to learn.

Probably not if that's what you start with. Carnegie Mellon now starts all CS students with ML, I believe. For those of us who learned to program in an imperative language first, the difficulty with learning functional programming is unlearning all of our bad habits.

"Functional programming" is 10% of what makes Haskell difficult. The intricacies of laziness and existential types and opimizing higher order functions are more the problem.

Re: Why I went from Python to Go (and not node.js)

#118
post #93

Earlier quoted context omitted.

> /me wanders back to a multi-million line Haskell codebase running systems in 25 countries, processing billions a year in financial transactions. Hope the codebase runs well, because that's the bank I use in Singapore ;-) Has you/anyone written something about how Haskell got picked for the task by that particular bank? Is the language used at other financial type businesses? I've heard some firms use Ocaml.

"I've heard some firms use Ocaml." Jane Street. Would be fun to see a panel with dons and Yaron Minsky discussing the pros and cons of Haskell and Ocaml, respectively.

Actually, that would probably be pretty boring--the two languages overlap considerably. I worked at an OCaml company this summer; coming from Haskell, I picked the basics up immediately and only took a bit more time to learn some of the more advanced features (e.g. OCaml functors).

I had some discussions about OCaml vs Haskell and, honestly, nobody could come up with a particularly strong case in either direction. (That said, we didn't do anything using multiple cores where Haskell has a bit of an advantage, I believe.) It always came down as "well, Haskell is awesome, but we're already using OCaml and it's pretty awesome too, and maybe easier to learn".

Much more interesting would be Haskell/OCaml vs everybody else, but that gets played out all the time anyhow :P.

Re: Why I went from Python to Go (and not node.js)

#119
post #27

Earlier quoted context omitted.

You're digging in. > Haskell I would argue against being an industry language FYI, the problems the Haskell community has been working on are things like scalability, performance and safety because they're critical to industrial problems . Toy approaches don't work at the scale we operate at -- you need real computer science. You want 1,000,000 Haskell threads in your app? You've got it. Want to write numerical model…

While I agree with you, please be careful - you're an extremely influencial member of the Haskell community. This post could come across as very smug, and is thus potentially damaging. I'm sure it wasn't your attention, but please - be careful.

If dons were concerned about this post hurting anyone's reputation, he would have a Herculean effort to clean up a decade's worth of similar and more scathing commentary.
Post reply on HN