Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It disheartens me a bit when people compare Go with C++. It gave me the impression that Go was created to be better C++ (or Java) mostly to make life easier for the thousands of developers at Google who are stuck with those two languages.


My understanding is that that is, in a single sentence, exactly why the project initially got started at Google.

http://www.infoq.com/presentations/Go-Google


That is at least partially the case. The other part of the story is that no existing languages were specifically designed for programming at a large scale.

Details: http://talks.golang.org/2012/splash.article


OP here. What do you think we should be using apart from C++ or Java?


Scala. Rust also looks extremely promising, though not mature yet. It is getting there quickly though.


If you use Scala in a way that has not a whole lot of extra cognitive load, it's a slightly prettier re-skin of Java. If you use it like it's Haskell, it has a cognitive load that's as bad as Haskell (or worse). And if you inherit a codebase from someone else, you can bet they've been tempted to be oh-so-clever. That's why I'd never let Scala near production.

Go has almost no cognitive load beyond the complexity of the algorithm itself.


It sounds to me like you're lumping things like writing for loops and mutating state in with the inherent complexity of the algorithm. I think reducing the ability to create abstractions like generic map/filter increases cognitive load. Reducing cognitive load is the whole reason I'm learning Haskell and currently use Clojure.


DISCLAIMER: I was an intern at Google

As with most programming languages, there is a small Scala following internally, but it's not a production language.

I don't know anything about any discussions about Scala. If I was thinking of deploying Scala, I'd be worried that Scala just doesn't offer enough over Java to warrant writing in a new language. Writing in Scala means not that you have to know it, but everyone who inherits it, and everyone who has to interoperate with it. The overhead is just too great to make a good case for writing something in Scala.


Ken Thompson (a Go lead) has held hostility towards C++ that is well-known and of long standing. (To wit, at the ACM Turing Centennial last year: 'I'm not sure what OO is supposed to look like, but I do know for sure it's not anything like C++.' (not verbatim, but accurate in the sentiment he expressed.)) As note below, Go was indeed designed to address perceived shortcomings of C++, among other goals.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: