Live data from Hacker News

Ask HN: Go programming language is over ten years old. What do you think of it?

news.ycombinator.com

281–290 of 310 posts

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#281
post #258

Earlier quoted context omitted.

> Depends on the JVM being used Is picking a jvm not tweaking a parameter?

Just like picking Go, gccgo, TinyGo, TamaGo or whatever might come down the line.

Nobody really does that.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#282
post #246

Earlier quoted context omitted.

Only on support for value types, everything else Java did it first.

You are prolific in your hatred of go

Nah, just when people push their fanboyism against Java, .NET or C++, without actually knowing those ecosystems.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#284
post #272

Earlier quoted context omitted.

This, plus it enables them to fire and replace developers without much difficulty because there's a great number of people who know these languages (see Java...).

You are actually arguing for mediocrity. If someone needs to protect their employment by making their work more obscure so they won't be replaced then they probably aren't a very good hire. Companies tend to want to retain highly competent talent - not mediocre people or incompetents.

I'm definitely not arguing for mediocrity since I'm not arguing for obscure code. I'm saying that companies that have much turnover (which a lot of software companies have) won't choose a language that doesn't offer them a huge pool of programmers.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#285
post #271

Earlier quoted context omitted.

I never understood why people are looking for things which are boring and I think it is mostly employers who do. They should look for something which is good and solves their problems. I don't know how something with the attribute boring is of interest here as other attributes for a technology/PL might be much more important... Actually they mean something different with "boring": It is just a lack of courage for sim…

In order to have a meaningful discussion, let me expand on what I mean by "boring". To me, a boring language is one that is easy to learn, easy to read and which encourages somewhat homogenous code - through coding style and common idioms. It has few surprises and few dark corners. If a language still has major aspects that practitioners struggle with after 2-3 years, it isn't "boring". If you have to expect every co…

> In order to have a meaningful discussion, let me expand on what I mean by "boring".

This is the problem with how boring is used. According to Wiktionary it just means "unable to engage or hold the interest". So how can this be a criteria for using a technology? Why do you redefine the word and deviate from the common meaning? What is the reason behind this? Why is it necessary that your understanding of "boring" has to be explained? It is a simple word which had a defined meaning for hundreds of years probably.

But here is my take on it: This was simply an attempt made by clever people within the industry to redefine the word so that they do not have to explicitly say what they really mean. Just call things without having a proper definition "boring". What is not boring must then be exciting. If we define boring to be good (which is actually crazy since the word itself has a negative connotation) everything exciting must be bad. Simple black/white thinking. And now we can simply call things "boring" as we like and indirectly call everything else bad.

Also it totally makes no sense to call technologies "boring" or "exciting" and thereby categorizing them for suitability. "Boring" is highly subjective. Some find Go boring, other find it to be exciting. Some find VBA boring, others experience it to be exciting. This has nothing to do with how complex, simple, fancy, hyped or old a technology is.

> To me, a boring language is one that is easy to learn, easy to read and which encourages somewhat homogenous code - through coding style and common idioms. It has few surprises and few dark corners.

Why is that boring to you? To me a language where I could easily reach a common ground with my colleagues so that we can together focus on business problems would be a very exciting language.

> Now I can understand that some people like the excitement of exploring new languages. Excitement of exploring new languages does not mean that the explored language is exciting/boring (whatever that means)

>However, asking your employer to let you use some language on a project because you find it "exciting" is a big ask.

One should only ask the employer to be allowed to use a new language if there is some benefit or if it is an experiment which will clarify whether it will be beneficial. This has nothing to do with boring/exciting.

> They may, however, be somewhat scared of "specialists" (in the sense of programmers who will insist on niche languages or niche technologies) because if you pay someone to write code, you don't want to have to search for "specialists" to maintain it or limit the size of your recruiting pool. You have an investment to manage.

True. This is where the risk parts enters the stage. It is always like this. The specialist might put you ahead of your competitors at a high risk while the generalist will keep you with the average at a low risk.

> Do you really think the choice of language is what makes a programmer brilliant or mediocre? Where did I even say this? What does talent have to do with the programming language being used?

> Then why doesn't reality agree with that view? If that were true then for every Donald Knuth, Fabrice Bellard, Jeff Dean and John Carmack there should be lots of even better programmers that do all their work in "exciting" languages. Where are they? They should be far easier to enumerate than the people who use "boring" languages?

Uh, with what view? Definitely not mine. Who says that the programming languages those people use are boring? I think you can simply choose any language and you are likely able to find 4 people who are potentially better programmers than the four mentioned. Not because they are bad or mediocre but because of the sheer amount of programmers in the world. Those four are simply famous but we have no proof/numbers on how "good" they are compared to the rest of the world.

> If you think caring about the long term value of code is "boring": try to start your own company and bet your own money.

And again. I never said this. Which definition of "boring" are you using here?

Also that sentence is dangerous. Even if caring for long term value would be boring (for some it might be exciting!) the real motivation for this is to secure previous investments which is a perfectly valid reason. Whether the way of achieving is is boring or not is completely irrelevant. And even further: If I would find an exciting(for me, since excitement is subjective) way to secure or even grow my investments I should not do it because it has to be boring? Securing investments or caring for long term value has nothing to do with whether something is boring or not.

> If you are that convinced of how "exciting" languages lead to brilliance it shouldn't be a tough choice to make

And once again. I never said this. I just said "Also we are scared of specialists and talent and want to stay mediocre" which not even mentions programming languages/technologies. I was just referring to how the word "boring" is misused and what might be the true intention behind the usage.

So in a summary: Good or bad decisions in business have nothing to do whether something is boring or not. This should never drive business decisions. But it seems like the word "boring" does.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#286

Earlier quoted context omitted.

Flask is better in the little mechanics of interacting with HTTP - parsing a parameter out of a URL (in Flask, it's a function argument; in Go, it's at least one extra line per arg), returning JSON (just return a dictionary in Flask), handling errors. Flask also is able to auto-reload the code when it changes (turn on development mode) which is really convenient. Plus all the ways that Python is more convenient than…

But...you are comparing a web framework with a Go's standard library. I mean, it's not a fair comparison. I'm pretty sure there are Go modules that support those handy things.

There are, but Go's type system doesn't really accommodate them very well. `interface{}` tends to abound, and it tends to feel less magical because you're still generally wiring things up yourself (i.e. you still have to explicitly unmarshal the request JSON).

In some ways, that explicitness is better because you know what's happening. In other ways, I'm incredibly tired of typing out 'if err := req.Bind(myStruct); err != nil { return err }'.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#287
post #22

My fingers are getting real tired from typing if err != nil all the damn time. I do like it for small things - compiling to one (albeit huge) binary and its relative speediness is nice. I wouldn't use it for large systems though. The amount of code really balloons over time, relative to, say, python and that SLOC correlates to bugs and maintenance cost.

Have you considered using a snippet or macro to type the 13 characters for you? Snippets or macros are available in most editors.

I have debated this. I was actually going to formulate mine into a pre-processor so that if I can change a macro it will retro-actively update the other ones. I thought it would be useful for this, and for structs that I want to replicate for various types.

At what point are we just creating a new language that compiles to Go, though?

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#288
post #272

Earlier quoted context omitted.

You are actually arguing for mediocrity. If someone needs to protect their employment by making their work more obscure so they won't be replaced then they probably aren't a very good hire. Companies tend to want to retain highly competent talent - not mediocre people or incompetents.

I'm definitely not arguing for mediocrity since I'm not arguing for obscure code. I'm saying that companies that have much turnover (which a lot of software companies have) won't choose a language that doesn't offer them a huge pool of programmers.

I think most shops that are run by people who have experience with software development will tend to choose languages that are fairly mainstream. Yes, the recruitment pool is bigger, but so is the entire ecosystem. Tooling, libraries, books, documentation, easy to find knowledge, long term committments etc.

There are few things that are more frustrating than working on something that so few people work on your search results when looking for solutions to problems come up nearly blank.

And despite what high thoughts we programmers have of ourselves: we spend an inordinate amount of time Googling things :-)

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#289
post #265

Earlier quoted context omitted.

Some examples: * Exceptions for error handling * Streams (map/filter/etc.) * Generics * Superior collections library (Set, ConcurrentHashMap, LinkedHashMap, etc.) * Records * Enums * Upcoming feature: pattern matching

This is not really what I had in mind. I know java has these features, but how would they make your program shorter? Could you be more specific? Maybe share an example of a real problem that is made easier by these features? Often people will give made up examples, but the trouble with made up examples is you can't tell if they actually matter in practice or not. Sure, if we invented a way to turn popcorn into gum, i…

I can give some concrete examples.

Exceptions create drastically shorter applications versus Go's explicit returns. I'll have to see if I can run an analysis later; I would wager that 20-30% of the lines in our monorepo are related to error handling. This is in large part due to the style of having the if err return err take 3 lines, but that's the prevailing style. Additionally, it requires an explicit handling block everywhere that might return an error, even if you don't want to handle that error there (i.e. in a web app, not handling an exception defaults to a 503 error. It takes 0 code to return a 503 on an error, which is usually the default error path).

For generics, I needed to write a map merge for two map[string]interface{} maps. Fairly basic, for scalar values prefer the value from the first map on conflict, for slices append the two arrays, for maps do a recursive merge. I used a type switch to get the type of each value, when I realized that []string and []interface{} were different, and that I wouldn't be able to append to a []interface{} unless I convert the []string. Fine, so I need a function that creates an []interface{} and converts each index in the []string to an interface{} and puts it in the array. Except because of the type signatures, I now also need one for every scalar type in Go. Is it an overwhelming amount of effort? No, but it did turn 6 lines of code with 12 lines of unit tests into something like 50 lines of code with 100 lines of unit tests (more type switches). Generics should have allowed me to say that I don't care what type the input is (and interface{} doesn't work here). Worse, now if I adjust a unit test, I have to do it in several places, not just one.

Those are the things that frustrate me in Go. It ends up feeling like I'm brute forcing software development; it's not the fastest way to do it, but it'll work if we're just willing to rewrite the same function 10 times with different type signatures, or write if err statements 10 times so that we can get the error up to the 11th caller in the stacktrace, who's actually going to do something useful about the error.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#290
post #221
post #218

Earlier quoted context omitted.

Still no excuse no to learn from the mistakes of others, Go has already so much "we don't do that here,...., ok we really should support that" that will eventually be just yet another Java, but hey it has cool designers.

If Go survives, it will end up as complicated as other languages. Rust, too, if it survives. You have to be arrogant to design a language and expect it to go anywhere, so you also tend to think you know better than everybody else, and that nobody has anything to teach you. It's an occupational hazard. Designing a language you don't mean to use yourself manufactures special failings. Rust's designers started with unus…

People who enjoy Go will probably tell you that Rust is already one of those complicated languages.

Personally I don’t agree, I think Rust is right in the middle, but that’s because to the left of Rust is Idris, Agda, Coq, Ada and Prolog. Most SEs don’t have those on their radar.

Post reply on HN