Live data from Hacker News

Six years of Go

blog.golang.org

311–320 of 327 posts

Re: Six years of Go

#311

Earlier quoted context omitted.

Voice of dissension here. I switched from: * Mysql to MongoDB * PHP to Python * Javascript to Coffeescript All because I was bored of the old tech. and it made the site unmaintainable. I mostly blame the MongoDB and Coffeescript for that. Now to be fair, I learned a ton and I am so glad for that experience, but I lost my website.

Do you really thing it's fair to blame a whole language for making your project unmaintainable, when you admit you were just learning it -- and you had come from PHP?

I dont blame a whole language. Again, it was mostly mongo and coffeescript. Python was the best thing about the project.

Re: Six years of Go

#312

Earlier quoted context omitted.

Voice of dissension here. I switched from: * Mysql to MongoDB * PHP to Python * Javascript to Coffeescript All because I was bored of the old tech. and it made the site unmaintainable. I mostly blame the MongoDB and Coffeescript for that. Now to be fair, I learned a ton and I am so glad for that experience, but I lost my website.

All because I was bored of the old tech. and it made the site unmaintainable. I mostly blame the MongoDB and Coffeescript for that. I think the blame would logically reside with you.

Thanks for reminding me.

Re: Six years of Go

#313
post #271

Earlier quoted context omitted.

I tried to go there to ask some questions while picking up the language, and what I got was RTFM, where manual includes the language specification, Effective Go book, and A Tour of Go. Apparently you're unfit to ask a question unless you know everything about the language already. Killed my excitement for learning the language.

What languages have nice IRCs? I ask b/c I was very pleasantly surprised by the extremely civil and noob-helpful #haskell. Are there other nice ones out there? Good to know...

Yep, check out #rust on irc.mozilla.org

Re: Six years of Go

#314

Earlier quoted context omitted.

What ? Of all the languages Java is the most likeliest to be around in 2100. It is the lingua de franca of enterprise software development. In every sense it is the modern day Fortran/Cobol.

Cobol was the modern day Cobol in 1995, and that was just 20 years ago. 85 years is a long time.

1995? Are you sure? I started studying maths and computer science in 1993 and Cobol was ever only mentioned as a remote curiosity. I remember Pascal, Perl and C/C++ were common.

Re: Six years of Go

#315
post #113
post #66

Earlier quoted context omitted.

I don't mean to be snarky and I'm definitely showing my age here, but isn't that exactly what devs were saying about node.js two years ago?

I can't remember anyone ever claiming javascript/node made their code cleaner. Speed and throughput were claims but not code quality.

I like the aesthetics of JavaScript. It makes the code cleaner because it doesn't require so much boiler plate. There - I said it :-)

Oh and compared to Go, I always point to sorting in Go. Just look up the library. I think it's awfully complicated, compared to JavaScript where you simply pass a comparator function. In Go you need a lot of lines to achieve the same thing.

Re: Six years of Go

#316
post #121
post #70

Earlier quoted context omitted.

Go's syntax is pretty much C-like though. Try comparing Go to Lisp, Pascal, Python, Visual Basic, COBOL, FORTH, etc etc. But at the end of the day, syntax is really just a superficial element of a language. Particularly when you're comparing Go with very syntactically similar languages such as Java, JS and C#.

Actually one of the guiding principles of Go's design is that syntax is anything but superficial. It affects nearly all aspects of your design. Everything from the parser to the compiler to the stdlib. Syntax is the UI/UX of your language. Dismissing syntax as superficial is a mistake.

Imperative languages really aren't massively different in the grand scheme of things. Sure, some are more OO than others, different type systems, and so forth. But you do more or less tackle the same problems with similar kinds of solutions. So a lot of the time, the syntax changes are relatively superficial compared to the complete mindset change you require if you were to tackle the same problem with a LISP, or Prolog, stack-based languages, or even a procedural SQL (albeit to a lesser extent).

I do welcome the breadth of choice we have in programming languages, but sometimes we get too caught up on the finites of one language of a particular sub-genre when compared to another language of the same sub-genre. Particularly when a good programmer should be more interested in coding good logic and thus understand the paradigms enough to swap between the different languages of the same ilk with relative ease.

Re: Six years of Go

#317

Earlier quoted context omitted.

Please just stop. This is not an objective issue. I for one have spent the last 2 years using Go to build a very performant system which is used by thousands of Bitcoin day traders every day. It's fast, stable, and easy to modify. I have never felt held back by a lack of generics. And yes, I've spent plenty of time using languages that do support generics. It can save you time but I've found it also enables "looser"…

> Please just stop. This is not an objective issue. When it comes to computer science generics have been an accepted part of PL research for decades. The extra expression power they give and the paradigms they enable are neither controversial, not something that's up to individual tastes to judge. Someone might not like them subjectively, but that's not different than someone not liking closures, or map or any other…

> When it comes to computer science generics have been an accepted part of PL research for decades.

Programming language "research" and computer "science" research has been irrelevant in the sausage industry for about four decades.

It's just like complaining accounting refuses to use category theory.

Re: Six years of Go

#318

Earlier quoted context omitted.

Happy to; I'll share the whole thing. http://pastebin.com/qBh6NRXc It's not cleaned up for easy reading (hell, I haven't even run `go fmt` on it ;) ). But it has unit tests and seems to work. ;) One thing worth noting is that it relies on the Storables to also be tagged with necessary JSON. It occurs to me that I could also have used tags instead of the key() function in the interface to specify which field in the St…

Just for you, I did a code review. The code review has two revisions, one where I gofmt'd it because I can't read non-go-fmt'd code anymore, and a second where I added comments expressing some concerns. I'll be honest, I gave up on a few bits just because it wasn't fun to do; I strongly suggest rethinking the use of a storable interface vs taking an 'interface{}' value for both gets and puts akin to how the json stdl…

Thanks for the review! I appreciate the feedback. One key piece that might have been unclear: since this code is part of a larger module (note package main), some of its parts live elsewhere. If I were to publish this, I'd consolidate those parts and build some proper module isolation here. OnStore is there purely because one of my resources needs to notify another part of the program that it has been stored; if I ever clean this up for public consumption, I'd probably want to add both pre- and post-handler hooks (along with the ability to add more rules and change the defaults, as Angular's $resource gives the client).

The advantage to the Storable is that other parts of the program can create and store those resources without needing knowledge of how keys are constructed. I also can't think of a way to do what empty() does without making it an interface function; "I need another copy of this unknown interface type" isn't something go has a clear solution for. Hypothetically, I could make empty() into a function that returns interface{}, take the key() suggestions you've given (though that leaks key-making knowledge), and then the whole thing would operate on interface{} type... Doable and more flexible, but not quite as clear on what resource will actually be stored and retrieved. Good tradeoffs.

A bit of feedback on feedback: avoid adjectives like "dumb" and "stupid." The signal-to-noise ratio is too low on them, and it makes for a harsher community (as other commenters in this topic have mentioned on their experiences trying to get help).

Re: Six years of Go

#319

Earlier quoted context omitted.

Cobol was the modern day Cobol in 1995, and that was just 20 years ago. 85 years is a long time.

1995? Are you sure? I started studying maths and computer science in 1993 and Cobol was ever only mentioned as a remote curiosity. I remember Pascal, Perl and C/C++ were common.

Yes but it was still dominant in terms of actual code in production. I remember working at a consulting firm then and we had a ton of work in Cobol and JCL. Banks in particular but also telecom.

Client-server 4GLs were really starting to take off -- PowerBuilder, Visual Basic -- but those got washed away with the web.

Re: Six years of Go

#320

Earlier quoted context omitted.

This isn't remotely true. CSP via goroutines and channels is idiomatic Go, but it's not the only option. Go offers mutexes and other concurrency primitives which, along with goroutines as lightweight thread analogues, allow what you're looking for.

The real problem here is that Go does not allow a user to create their own powerful concurrency primitives. Locks exist, but you can't create a synchronized data structure. You can't create your own channel type because that's a generic thing which is reserved for the language authors, not the language users. The whole point of modern programming is to create useful abstractions that allow a programmer to get things…

I wish I could upvote this +1000
Post reply on HN