Live data from Hacker News

Go 1.6 is Released

blog.golang.org

271–280 of 367 posts

Re: Go 1.6 is Released

#271

Earlier quoted context omitted.

I don't like Oracle. I don't like the JVM. I refuse to learn Java because I personally have a strong bias for native, compiled code. In fact, I really dislike everything about the Java way of programming. The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with what I would consider the ideal creative process for me as programmer. That being said, if I were starting a…

For my money, Java is a pretty good language; there are only a couple of things that I think were real mistakes in the core language. And the JVM certainly performs. But the ecosystem around Java is very complex and hard to manage. Dealing with JVM configuration, webserver configuration, build system configuration, IDE configuration and God knows what else takes up all kinds of brain-space. And every so often the com…

> JVM configuration

This is the mother of all premature optimization. Other than maybe modifying heap size or setting client vs. server, most of the default JVM configurations work for almost everything.

> build system configuration

I actually find maven pretty easy to use, but maybe it's just that I am used to it.

> IDE configuration

I don't know what crazy IDE you are using, but both Intellij and Netbeans need very little, if any, configuration out of the box.

> [Java] community goes off on some crusade

As opposed to everyone else? /s

Re: Go 1.6 is Released

#273
post #238

Earlier quoted context omitted.

Not that I even care that much, but that's total crap. Compile-time generics, which is what most people seem to be referring to when they say they want generics in Go, are eminently doable. It would not be hard to implement. Runtime generics are probably possible as well. What are you even basing your assertion on? Edit: What do you mean, "there will never be a 2.0"? Do you have a crystal ball?

The team has already stated "The language design is done".

The issues list has a bunch of breaking changes they've put off to Go2. It won't come soon, but probably at some point they will produce a Go2, if only to fix a few small annoyances and things they got wrong in the stdlib which would otherwise break the Go1 pledge. Of course, that doesn't mean Go2 will introduce lots of huge changes to the language, I doubt very much it would, but it probably will happen sometime.

https://github.com/golang/go/issues?q=is%3Aopen+is%3Aissue+l...

As another datapoint, here are the answers of the team to a question on what they dislike about Go1. These are mostly breaking changes which would require a Go2. I don't think anyone is hostile to it long-term, they're just not in a hurry. There is a huge value to developers in not having churn in an ecosystem and breaking changes, I and many others really value that and am pleased they take this approach.

https://www.reddit.com/r/golang/comments/46bd5h/ama_we_are_t...

So I think you've misinterpreted the above statement, it was probably an off hand remark in response to proposals for Go1 which would have radically altered the language (I can find no ref to it on the web, 0 results for that phrase).

Re: Go 1.6 is Released

#274

Earlier quoted context omitted.

What do you do when a dependency has a security problem? Or some other bug?

Its generally unlikely those things lead to interface changes. e.g. func bcrypt(salt string, password string). Generally the bug isn't in the interface. So its somewhat safe to upgrade the dep and see if the compiler complains Also exporting of interfaces is protected by case private()/Public() which leads to refined interfaces being exported. And the go vet tool expects all exported functions be documented. Not sayi…

This didn't directly answer my question, but it implies that you just periodically update all of your dependencies to the latest versions and pray your tests pass with minimal changes required.

Yes?

Re: Go 1.6 is Released

#275
post #197
post #186

Earlier quoted context omitted.

Or code generation?

I'm getting furstrated by code generation. I have a big project with has 3 files with (only) generated code. It's essentially repeating the same 15 lines about 50 times with slightly different types. And yet I far prefer all of them over an interface{} solution. Works so much better. But the files are just so ugly, and changing them is rather hard. Worst of it all, I've been thinking about generating other pieces of…

What are you using generated code with lots of types for out of interest? I haven't felt the need as yet but would like to try it out.

Re handlers, you really don't have to use the http handler. I use one which accepts a context, and returns an error (for rendering), which simplifies the boilerplate somewhat as errors are rendered by the router. I'd look into using your own interfaces before generating standard http handlers.

The other thing to bear in mind is that if you try to make things all implicit rather than explicit in order to avoid repetition, it's very easy to be unaware of what's happening behind the scenes (auto-auth, or auto-render as in rails), and get stuck when you want to do something off the beaten path. I rather like Go's more verbose but very explicit style. It's a trade-off.

Auth, CSRF, parameter parsing should definitely be in a separate pkg you're using, not repeated each time IMO, so there should be minimal boilerplate for those.

Using text template is a really nice way to generate http handlers if you typically set up resources in a similar way, so I'd definitely recommend trying that out. I haven't looked into go generate as that came out after I started this approach.

The approach I take is to generate actions with all the normal code in them as scaffold (for CRUD actions) - so for each one auth, then setup, then business logic, then render, and then edit those as necessary, as often as an app grows each action diverges from the standard (say it doesn't do auth, or processes parameters differently etc). This is easy, explicit, and very clear when returning to code after 6 months at the cost of some verbosity.

Re: Go 1.6 is Released

#276

Earlier quoted context omitted.

I don't like Oracle. I don't like the JVM. I refuse to learn Java because I personally have a strong bias for native, compiled code. In fact, I really dislike everything about the Java way of programming. The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with what I would consider the ideal creative process for me as programmer. That being said, if I were starting a…

>For better or worse, CS departments across the US produce Java programmers more than anything else. Do you think this large pool of programmers are good? >This makes it very easy to hire Java developers. Yes, if you are looking for sub-par developers. I don't think Google thinks to itself "oh man we're so glad we use java, otherwise hiring would be challenging". No, they have just as much difficultly hiring as anyon…

> Do you think this large pool of programmers are good?

Yes, why not? I have yet to see evidence that Java programmers are not good. Seems like a discriminatory mindset. The large pool also makes them easy to replace. I think Facebook has had an ad for an Erlang developer for a few months now. I don't think a startup needs that kind of stress.

Also, I'm sure there are Java Devi who are absolutely fantastic. That is, I think the idea of the meme "real passionate programmers use less mainstream languages" is entirely unsubstantiated. This line of thinking comes from immaturity, elitism, and a desire for validation by association.

It's just like the "the best lawyers were on the debate team" meme that's also very untrue. It sounds nice if your kid is on the debate team, though

>No those are the things the JVM has.

I meant Java as a platform. Funny, you were the only one who didn't know what it was what I meant here.

> You honestly can't believe this. How much functional programming experience do you have?

I've dabbled with Erlang and Haskell. I don't have as much functional programming experience as I would like. Also, I've only heard good things about Scala and Clojure. What was so ridiculous to you about what I said? Or are you unable to forgive an accidental conflation of Java and the JVM?

Your criticism come across as nothing more than unreasonably pedantic expectations for terminology. They either reflect your inability to use context clues effectively or your lack of common sense.

> It's the 'blub' language to us PG speak

This is a poor reason to think Java developers are incompetent. I hope this isn't the premise that led you to that inherently false conclusion.

Re: Go 1.6 is Released

#277
Seen a lot of Erlang mentions in this thread. Is that the native alternative to Go?

Personally, I prefer to write code in a functional manner. While I've always thought Go looked like an amazing platform for programming in general, I haven't been keen on moving to another imperative language.

It seems the landscape for functional alternatives are mainly Scala and Clojure which are both based on the JVM and require a bit of time to learn the tooling. I am not a Java or JVM export, so I haven't been too inspired by this either.

Re: Go 1.6 is Released

#278

Earlier quoted context omitted.

I don't like Oracle. I don't like the JVM. I refuse to learn Java because I personally have a strong bias for native, compiled code. In fact, I really dislike everything about the Java way of programming. The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with what I would consider the ideal creative process for me as programmer. That being said, if I were starting a…

> I refuse to learn Java So you willfully ignorant but will continue to spout off opinions anyway?

I've read a lot about Java. I just don't want to learn it on my free time. My opinions were based off what I read

Re: Go 1.6 is Released

#279

Earlier quoted context omitted.

I don't like Oracle. I don't like the JVM. I refuse to learn Java because I personally have a strong bias for native, compiled code. In fact, I really dislike everything about the Java way of programming. The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with what I would consider the ideal creative process for me as programmer. That being said, if I were starting a…

> I refuse to learn Java So you willfully ignorant but will continue to spout off opinions anyway?

[deleted]

Re: Go 1.6 is Released

#280

Earlier quoted context omitted.

I don't like Oracle. I don't like the JVM. I refuse to learn Java because I personally have a strong bias for native, compiled code. In fact, I really dislike everything about the Java way of programming. The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with what I would consider the ideal creative process for me as programmer. That being said, if I were starting a…

> I refuse to learn Java So you willfully ignorant but will continue to spout off opinions anyway?

[deleted]
Post reply on HN