Live data from Hacker News

Why Go is my favorite programming language

michael.stapelberg.de

251–256 of 256 posts

Re: Why Go is my favorite programming language

#251
post #141

Earlier quoted context omitted.

As Sandy Metz once said, "A little duplication is far better than the wrong abstraction." After a decade of OOP indoctrination and misuse, we see the results of this. > Go has popularized a mode of writing code where not only are abstractions unwelcome, but they're nearly impossible This lends me to believe you actually haven't written any go code for yourself. This is the same thing every OOP-indoctrinated developer…

> As Sandy Metz once said, "A little duplication is far better than the wrong abstraction." like writing 500 * if err != nil { return err } is an average Go app? A little yes, but this isn't a little.

like having your IDE cover the other 100 some-odd places of boiler plate such as writing getters and setters, and implementing comparable and hashCode and every other piece of insanity? Also, I much prefer to handle my errors where they happen in the code rather than do Pokemon try/catching. Sorry, the if err != nil horse has been beaten to death already.

Re: Why Go is my favorite programming language

#252

Earlier quoted context omitted.

As Sandy Metz once said, "A little duplication is far better than the wrong abstraction." After a decade of OOP indoctrination and misuse, we see the results of this. > Go has popularized a mode of writing code where not only are abstractions unwelcome, but they're nearly impossible This lends me to believe you actually haven't written any go code for yourself. This is the same thing every OOP-indoctrinated developer…

> After a decade of OOP indoctrination and misuse, we see the results of this. Sure, but that's OO's fault and the lesson is not "abstractions are bad" but rather, "OO's good at domain abstractions and bad at universal abstractions." The takeaway should not be to discard the last 12 years of advances in computer science and call it quits with a bad copy of Erlang's concurrency model and a weak version of C. > This le…

[deleted]

Re: Why Go is my favorite programming language

#254
post #141

Earlier quoted context omitted.

> As Sandy Metz once said, "A little duplication is far better than the wrong abstraction." like writing 500 * if err != nil { return err } is an average Go app? A little yes, but this isn't a little.

like having your IDE cover the other 100 some-odd places of boiler plate such as writing getters and setters, and implementing comparable and hashCode and every other piece of insanity? Also, I much prefer to handle my errors where they happen in the code rather than do Pokemon try/catching. Sorry, the if err != nil horse has been beaten to death already.

> like having your IDE cover the other 100 some-odd places of boiler plate such as writing getters and setters, and implementing comparable and hashCode and every other piece of insanity?

What is insane is believing returning errors is actually handling them, it is not, you're just passing the burden on the caller.

Second, Go isn't free of all the bullhshit you described so I'm not sure what is your point, that you don't have to write getters and setters in Go? lol, off course you do have to.

> Also, I much prefer to handle my errors where they happen in the code rather than do Pokemon try/catching

Who cares, go back playing Pokemon since apparently that's the only thing you can think off and stop being an hypocrite. What do you think panics are? yes, it's an half-baked exception system, like everything in Go, a language designed by people who clearly didn't know what they are doing, for people who don't.

> Sorry, the if err != nil horse has been beaten to death already

Yes, and don't worry, people will keep on beating that horse, because it was designed by people that clearly don't know what they are doing.

Re: Why Go is my favorite programming language

#255
post #48
post #21

I have said it before and I will say it again - for all the deficiencies Go has, it is somehow highly compatible with the way my brain works. One point the article does not mention is the documentation. I think Go's documentation is excellent, it does not overwhelm the reader with its volume, but mostly anything one might want to know about the syntax and semantic can be answered by carefully reading through the docu…

"for all the deficiencies Go has, it is somehow highly compatible with the way my brain works." I have been tempted to write a blog post about "Why People Actually Can Write Real Programs In Go." To listen to HN complain about the language you'd think that it must be clearly impossible to ever write a program of any kind without massively copying and pasting everywhere, when in reality I find it's actually quite plea…

> I have been tempted to write a blog post about "Why People Actually Can Write Real Programs In Go." To listen to HN complain about the language you'd think that it must be clearly impossible to ever write a program of any kind without massively copying and pasting everywhere, when in reality I find it's actually quite pleasant for a non-trivial subset of programs.

People like you are missing the point.

Yes, you can write anything in Go and with "interface {}" everywhere in your codebase. Like you can write anything in Javascript and not care about type safety since it's weakly typed.

However, not caring about compile time type safety with a compiled language is intellectually lazy. I'm talking about both go designers and developers here.

People want generics not for the sake of it, they want it because they want to write compile time type safe code, that's what generics are, just types.

"interface {}" everywhere isn't "caring about compile time type safety". It's using Go like it is python. What's the point of a compiler if the programmer has to do its job? that the issue with Go. Too much stupid run time tricks for a statically typed language.

Generics exist for a reason, a modern statically typed language who doesn't implement it is broken. And just like people are productive with PHP, anybody can be productive with a broken language. So the productivity argument is a fallacy. Go is the PHP of statically compiled languages. In fact append,delete,make,copy being native functions is no different from PHP implementing hundreds of native functions in its global namespace. It doesn't look good at all.

Re: Why Go is my favorite programming language

#256
post #173

Earlier quoted context omitted.

>The problems these two sets of languages solve are fundamentally different. I'm afraid I fail this intelligence test. What problems are solved by C, Go, PHP and server-side JS but not by any of Java, C++, C#, D, Rust or Scala (and vice versa)? This seems like a completely arbitrary classification to me.

Sorry, I had thought that it was quite obvious: JS, PHP, and Go are almost exclusively used for web-related tasks. Yes, one can find other usage examples, but by and large, that's their main field of application. To expand on this, imagine building some complex application framework with these web-oriented languages. Without decent abstractions and insufficient typed programming support (see e.g. TypeScript to JS tra…

> JS, PHP, and Go are almost exclusively used for web-related tasks

JS is used for GUI tasks too, so your point seems totally arbitrary. Java is heavily used to write servers and services as well.

> I hope that explains why I don't see Go as comparable to complex, high-level languages - and in no way in competition with them, in fact.

Javascript and PHP are complex high-level languages as well. Your point doesn't make any sense. Go is the way it is because it was designed that people who rejected 30 years of type theory. But now they have a problem, because they repeated the same mistakes as C and now they are planing to break everything with Go2? they just quietly admitted they were wrong, it's time to admit you are wrong as well.

Post reply on HN