Hacker News new | past | comments | ask | show | jobs | submit login
Why Google's Go is a Bore (funpic.de)
51 points by ThinkWriteMute on Dec 14, 2009 | hide | past | favorite | 23 comments



I'm not sure the negative comments about UNIX, C braces and C++ templates help.

They are unrelated to the case and make me feel the author isn't interested in being constructive.

The debate between terse and ugly is a non-sense. Had the author a more open mind, he'd realize that the comfort zone where we place things we call "beautiful" is flexible and what one may find ugly the other may find beautiful.


Well, I'm out of steam on this rant. Why the vituperative venom if Go is so uninspired and boring? It's the noise around it, really. It's yet another celebration of technical mediocrity that has caused computing to never really live up to its potential. This offends me at a profound level.

Complaints only add to the noise. Building things is the best way to add to the signal instead.


I'm a friend of the writer and we are actually looking at building something. "Wequi", or the original word for the game Go.


You'd be surprised how much actually gets done when being nice isn't forced and ranting once and a while is cathartic.

That said Go is a uglier than a dismembered hog. There's no beauty in Go.


Forget being nice, how about some constructive criticism? That doesn't have to be nice, but in contrast with the article, has valuable content put forth.


Popover ads?! Nearly made me close the tab without reading a word of the article.

funpic.de is obviously an old-fashioned sort of hosting company.


Stopped reading when I got to the first use of "UNIX virus" (actually I didn't but I should have). Unnecessary for the article, which itself is fairly lack-luster.


>...you don't put in language features assuming a good programmer.

Interesting design goal.


Way to miss the point.

Another way of putting it would be that languages should be designed so that there aren't gaping holes waiting for people to fall in. They should rather tend towards a "pit of success" - the easiest way to do things should be the correct way.

Error code results make it really easy to ignore errors. That's not a good thing.


No, it doesn't in this case. The multiple return values make it impossible to accidentally ignore an error.


It requires at least 3 lines for every function call unless you ignore errors. Exceptions allow you to catch them without boiler-plate for each function.

  if result, ok := func(arg); !ok {
      // handle error
  }
  // process result ..other stuff
On the other hand channels & goroutines allow in principle less verbose mode at the cost of additional parameter to every function in a stack.

  errors := make(chan Error)
  go handle_errors(errors) // read from errors
  // ...
  result := func(arg, errors) // write to errors in case of an error
  // process result ..other stuff


Boredom is a problem of depth and duration.

TFA is putting expectations on GO that seem out of line with "Systems Implementation Language". The article expects that each new language will be an "advance", whereas in the school of Arthur Sale or C.A.R. Hoare often advocate removing stuff from a language to make it better.


yawn

Yet one more rant completely missing the point and whining about the lack of exceptions (which at least as implemented on most languages most sensible and experienced people agree foment bad error handling practices, so the current Go approach is superior) and generics (still unclear if they make any sense given Go's interface system, which the author completely ignores.)

And reading the rest of the gripes, the author clearly had zero interest in learning the language.

> (Yes, that is a statement you see between "if" and the test. No, it serves no real purpose beyond obfuscation.)

Way to show you have not learned anything about the language or even tried to write even a program a dozen lines long!


The best thread on the Go list about exceptions IMO has been http://groups.google.com/group/golang-nuts/browse_thread/thr.... In particular see http://groups.google.com/group/golang-nuts/browse_thread/thr... where I tried to explain the strengths and limitations of exceptions.

In particular you'll find an answer to your silly claim that exceptions are something that most sensible and experienced people agree foment bad error handling practices AND you'll find an explanation of why they are reasonable to omit from Go.


Fundamentally disagree with you on exceptions. Exceptions as implemented in e.g. Delphi or .NET work very well. In C++ the complexity of exception handling is deeply exacerbated by things like copy constructors - the bias in the language towards (what I call) value-oriented programming, rather than object orientation - and in Java exceptions are hobbled by the misguided notion that exceptions should be handled nearer the point of the throw rather than far away, in the relevant main loop of the app; hence the requirement to trace through annotations throughout the call graph from low-level throwing code to high-level catching loops, or basically avoid the bad design with RuntimeException.


I agree with the person you are disagreeing with, in this case. Go is being touted as a systems programming language.

My experience of very low level programming is that you want to know exactly what's happening, and especially when things go wrong. And you want to know what's gone wrong right at the point of it going wrong.

Exceptions are the wrong technique for this form of programming. When doing systems work you are spending a lot of time dealing with error situations and hence the handle the error and pass up an error code form is appropriate.


"Systems programming language" is a loaded term, IMO. Many people have used C - probably the canonical systems programming language - inappropriately for applications where better languages would have been more suited. We've paid the price in insecurity, buffer overflows, memory errors, etc. many times over. I think you need to more clearly define what you mean by it.

You can't mean very low level programming, since that is a very small fraction of all programming - and probably not the best domain of a general purpose programming language.

As I mentioned in another comment in this thread, I see exceptions as exactly equivalent to a rigorous approach to error codes.

I also note with interest that you describe the form as "handle the error and pass up an error code". This reads to me as a contradiction in terms. While the error code is still propagating, the error has not been handled. Some intermediate cleanup has perhaps been done, but normal code execution has not yet resumed. Moreover, exceptions have mechanically checkable formalisms for these phases of error handling.


Even in Kernel programming, exceptions are useful. If you read http://www.kernel.org/pub/linux/docs/lkml/#s15-5, you'll see that goto's are used to reduce code duplication for error handling, which is essentially just a poor man's exception. More sophisticated exception handling in C can and has been done with longjmp as well.


Go has goto.

Unlike goto as used in the linux kernel, exceptions will jump up the call stack god knows where.

And in essence exceptions are not goto, but camefrom.


Exceptions jump to the declared handler - i.e. the right place.

I remain convinced that far too many people have gotten wrong ideas about exceptions from the bastardized implementations in C++ and Java.


One of the reasons why exceptions are difficult to use well is because of the guarantee you offer when you raise one.

What happens when your function raises an exception?

Rollback? Undefined?

That's the real difficulty.

More information here: http://blogs.msdn.com/oldnewthing/archive/2004/04/22/118161....


Guarantees in the case of error is an orthogonal issue. The same problem exists for error codes. In fact, I see exceptions as a formalization of an extremely rigorous approach to error codes, where in the case of a failure the error codes is immediately propagated to the callers after local cleanup.


And what about that mascot character? Geez, that is the ugliest thing ever.




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

Search: