Live data from Hacker News

I want off Mr. Golang’s Wild Ride (2020)

fasterthanli.me

331–340 of 477 posts

Re: I want off Mr. Golang’s Wild Ride (2020)

#331
post #94

Earlier quoted context omitted.

Could you share a few of them?

- Most Node code I encounter that uses “streams” gets something wrong. Usually minor, sometimes major stuff like forgetting errors exist altogether, or to reject a promise wrapper when an error occurs. - Incorrect use of concurrency stuff like process.nextTick. This function probably doesn’t do what you think it does based on the function name - it won’t “yield to the event loop”. - for years Buffer and friends was t…

Awesome response, thanks.

You're right about streams, the way their API was designed just doesn't fit into my process of thought and I'm always heading back to read the spec. carefully + examples.

It definitely could've been made much more simple.

Re: I want off Mr. Golang’s Wild Ride (2020)

#332
post #247

Earlier quoted context omitted.

> no idea why people get so worked up about character counts Think of reading code as mining ore. If the ore is rich, you don't have to mine and process nearly as much of it to get the material you need. If the ore is poor, you have to invest extra effort to mine more ore to get the same amount of refined material. You might think Go is easy to read because lines are individually very easy to read, but Go code is so…

> Think of reading code as mining ore. If the ore is rich, you don't have to mine and process nearly as much of it to get the material you need. If the ore is poor, you have to invest extra effort to mine more ore to get the same amount of refined material. Reading code and mining have nothing in common. In particular, mining technology works best on dense ore, human visual perception requires whitespace to operate e…

I don't think the difference between Go and more expressive languages is about whitespace. If the only way a language achieved fewer lines of code was by cramming more characters into a line, I wouldn't give it any credit for that..

> Has there been much innovation in exceptions among 21st-century languages?

Yes, there has, mostly in the ability to use exceptions less than previously. With Java (at least old-school Java, not sure where it is now) exceptions are the only type safe language-supported way for a function to terminate with multiple types. If a function has multiple possible return types that don't have an inheritance relationship, you can choose between 1) returning Object and dynamically checking for the specific types, 2) defining a return class with a field for each possibility, or 3) picking one type to be the "expected" outcome and defining all other outcomes as exceptional. With 1) you lose many of the benefits of static type-checking; with 2) you get code bloat; with 3) you get the hazards of using a nonlocal control mechanism when you don't want that power.

If your language has sum types, you have a better option for those situations.

Re: I want off Mr. Golang’s Wild Ride (2020)

#333

Earlier quoted context omitted.

I don't think "screen real estate" is the right argument here. The problem is just that every line creates cognitive load and there's a tradeoff between concision and descriptiveness. A language with piles of syntactic sugar and magic gets it wrong with too much concision and can read like line noise when it gets overused. Go goes the other way though and makes it way too verbose and just makes it difficult to read t…

I disagree. IMO, there's much more cognitive load in parsing dense, "minified" code than there is in scanning code whose control flow mirrors its visual structure. Humans are very good at seeing visual structure (which is why we tend to indent, split code across lines, and other syntactically insignificant usage of whitespace). By convention in most mainstream programming languages, this visual structure mirrors code…

So, the thing specifically about ? in a language with Result is that you can read some code that uses it and not worry about what happens for Error cases if that's not currently your focus - the question marks aren't a "Look at me!" focus the way something like try-catch is.

But if you are wondering about Error cases, they are there to see when you're looking for them because that ? while unobtrusive is something you can look for.

I'm sure in most IDEs you could have it highlight ? in a "Looking for error handling" mode if that's what you want.

Note that Rust does not consider control flow to be something the core language owns exclusively, you can return core::ops::ControlFlow to say actually I also have an opinion about whether you should keep going, this can make sense for a closure or function intended to be called inside an iterator or other loop context. Some of the ergonomics for this aren't finished, but what is there is already useful where a Result would work but is ugly because your early exit scenario isn't in fact an error at all.

Re: I want off Mr. Golang’s Wild Ride (2020)

#334

Earlier quoted context omitted.

Fun history fact: Rust had conditions, a very very very long time ago, but folks didn't use them and found them vaguely confusing, so they were removed.

This doesn't mean very much. Most people find the Rust borrow checker "vaguely confusing" (if not very confusing), and most people also wouldn't use it were it not strongly suggested by both the compiler and the community ("suggested" as unsafe Rust exists, but you of all people are aware of that). Conversely, I understand condition systems, and I'm not a very good programmer. (I've tried and failed to learn Rust onc…

I don't mean to say anything about conditions generally, just to mention that they have existed in non-Lisp languages on occasion.

> We're very fortunate that programming language design doesn't advance solely by giving people more of what they already use.

Agreed!

Re: I want off Mr. Golang’s Wild Ride (2020)

#335
post #65

Earlier quoted context omitted.

The Kubernetes codebase is huge, but in my (limited) experience I really felt like it was delivering on Go’s promise: that I can read any given file and understand what’s happening. At least when I needed to debug Kubernetes issues 4 years ago, I could grep around, dive into a file, and command-click to “go to definition” and quickly build a local understanding of the code around my problem. No spooky action. Everyth…

What I wonder, is if by designing a language to enable happy corporates, rather than happy programers, is Go not shooting itself in the foot, as the now less happy programmers (because corp mandated Go) would move to other corps, creating more cost to the corporate than if they had use a more joy-inducing language. IOW, Go is probably great if you're quite big. But like most Google created dev tools, the questions we…

Java worse than Go in many regards, and many successful business seem to continue using it. Probably the marginal cost of one unhappy Scala magician leaving a company is far lower than the cost of writing all software in Scala, to keep Scala type magicians happy. Substitute "Scala" with any language that has high joy/freedom.

Re: I want off Mr. Golang’s Wild Ride (2020)

#336
post #131

Earlier quoted context omitted.

Go look at HCQ/Ivermectin/Cryptocurrency for examples of such brigadiering.

The trouble is, you can't -- only the commenter can see their score swings, and then only if they pay attention. Publishing upvotes and downvotes would allow others to see these effects, and would allow them to register a comment as "controversial" rather than "not worthy of notice". Data on who made what vote could also be useful.

Some old, old discussions on this:

https://news.ycombinator.com/item?id=2403716

https://news.ycombinator.com/item?id=2445039

That is, in the old days the total score was shown to everyone, but it was deliberately changed.

Re: I want off Mr. Golang’s Wild Ride (2020)

#338
The utterly poor decisions made by the GO team over decades tells the story that stupid stubbornness is more important than practical use of the language. How could one not address the obvious problem with the lack of generics directly. Why is the stupid AND ERROR PRONE ERROR HANDLING NOT FIXED?

Along with this the GO team make breaking changes for performance. Amateurs basically.

Re: I want off Mr. Golang’s Wild Ride (2020)

#339

Earlier quoted context omitted.

What an extremely convenient template to dismiss any nuanced argument against "worse is better". You even get to question my credentials a couple times! (I apparently pick metrics that are convenient to my argument, and fundamentally misunderstand programming language design). Even if I accept the premise that "I'm challenging Go on things it doesn't promise to deliver" (which is disingenuous to begin with — correctn…

>because it prevents you from building abstractions, Replying to just this part of your comment, but building abstractions can be as much a source of new complexity and cognitive overhead as it can reduce them. I think Go is wise to be on the side of less abstraction, because most of the abstractions it makes hard end up hurting more than they help. >What an extremely convenient template to dismiss any nuanced argume…

> because most of the abstractions it makes hard end up hurting more than they help.

You got any proof for that?

Re: I want off Mr. Golang’s Wild Ride (2020)

#340
post #186
post #98

Earlier quoted context omitted.

Having to write the same code several times with minor changes because of a lack of abstraction is a lot of fun.

I don't know how people can say go "gets out of the way". Go makes me write dozens of lines of code to do something simple that in an any modern language takes a few. It doesn't get out of the way, it gets in the way constantly. I'm constantly thinking in any modern language I can just do X, but in Go with its myriad missing features I have to sit and think about how I'm going to do it with just loops and if statemen…

> Go makes me write dozens of lines of code to do something simple that in an any modern language takes a few.

"Getting out of the way" doesn't mean it takes fewer keystrokes - it just means that you don't have to think about it / there are no surprises. It took me a while to grok what pythonic code is and looks like, and I feel the bar for Go is even lower. Even if you're browsing an unfamiliar codebase, code is exactly where you expect it to be, and you don't have to ponder on where to make your changes. To me, that is how a language moves out of the way; it fades into the background and you mostly concern yourself with the logic.

Post reply on HN