Live data from Hacker News

Go is amazing, period.

poincare101.blogspot.com

201–210 of 241 posts

Re: Go is amazing, period.

#201

Earlier quoted context omitted.

What about using two characters for assignment? a := 1 vs a = 1

":=" is type-inferred variable declaration and assignment, while "=" is just assignment.

It is a bit annoying having to press 3 keys using two hands instead of just one.

With '=' I can "hyperthread" my typing. While I'm finishing the LHS and pressing space I can move my right hand to press '=', while keeping my left hand thumb in place to press the space bar for the right side.

With ':=' I have to stop everything to press shift with my left hand, then press ':', then release shift and press '='. It's very inefficient for something that happens often.

Re: Go is amazing, period.

#202
So he recommends Go but has never actually used it? The only reason he looked at it again was the potential to use it for a small project he never finished or did I miss something?

Re: Go is amazing, period.

#203

Earlier quoted context omitted.

":=" is type-inferred variable declaration and assignment, while "=" is just assignment.

It is a bit annoying having to press 3 keys using two hands instead of just one. With '=' I can "hyperthread" my typing. While I'm finishing the LHS and pressing space I can move my right hand to press '=', while keeping my left hand thumb in place to press the space bar for the right side. With ':=' I have to stop everything to press shift with my left hand, then press ':', then release shift and press '='. It's ver…

I've never really had a big issue with this. I have no issue keeping my thumb on the spacebar while holding left shift, and in addition I've grown to rather like the syntax.

In the long run I'd say multiple assignment probably saves you more time writing declarations than an extra key-stroke would cost you.

Re: Go is amazing, period.

#204

Earlier quoted context omitted.

":=" is type-inferred variable declaration and assignment, while "=" is just assignment.

It is a bit annoying having to press 3 keys using two hands instead of just one. With '=' I can "hyperthread" my typing. While I'm finishing the LHS and pressing space I can move my right hand to press '=', while keeping my left hand thumb in place to press the space bar for the right side. With ':=' I have to stop everything to press shift with my left hand, then press ':', then release shift and press '='. It's ver…

Just think about how much more you'd have to type if you were programming C, and you'll be ok :)

My main gripe with := vs = is that as I change my code, an existing := may suddenly become invalid, meaning I have to go back and change it when compilation fails, or vice versa.

Re: Go is amazing, period.

#205
post #155

Earlier quoted context omitted.

Closures and first-class functions aren't an achievement. Closures and first-class functions in a language low enough and fast enough level for systems programming? That's an achievement. Same for unicode. These aren't just features. These are features done fast .

Lisp has been having all these for five decades now and those features are done fast. http://shootout.alioth.debian.org/u32q/benchmark.php?test=al...

So much for Lisp as the ultra-expressive, compact language, I guess... Impressive speeds, though.

Re: Go is amazing, period.

#206
My background is in garbage-collected languages, including .NET and PHP. Because of my lack of background in manual memory management, I've always been nervous to try to learn C, even when it may be a better approach.

Go sounds like a great language for someone with my background to be able to work with a closer to the metal language but by handling some of the more difficult aspects of working with C like memory management and pointer arithmetic.

Re: Go is amazing, period.

#207

Is there currently a good web framework for Go? Edit: web.go looks pretty sweet: http://www.getwebgo.com/ Edit2: As does app.go: https://github.com/georgenava/appgo ...There's a large list of Go projects here: http://godashboard.appspot.com/project

A simple server for static files and blog posts: https://bitbucket.org/floren/goblog

It uses only the packages which ship with Go, with the exception of a Markdown parser. Unfortunately, it's written for an ~6 month old release of Go on Plan 9, but you can get the general idea of building Go web stuff. The code's a bit ugly too, but it does work.

Re: Go is amazing, period.

#208
post #99
post #8

A lot of great and capable languages are overlooked. The question is how do they overcome the opinion, hearsay and preferences that are louder than the truth? Too few devs: - truly give something 5 minutes before jumping to their foregone conclusion. - admit that most languages with a decent capable and decent programmer are all, pretty equally equipped. - every language + framework has it's pros and cons.

5 minutes isn't fair. I took a look at http://shootout.alioth.debian.org/u64q/benchmark.php?test=al... first. OK so Go is about on par with Mono's C# performance and uses up to a 1/3 of the memory with code that is more concise. That's cool because it means I'm not sacrificing anything over the platform I specialize in (C#; although the last time I looked at the Alioth C# code I thought I saw some obvious improvement…

Hi, the idea with "5 minutes" is to find the first thing that wasn't as you might have thought it was. Then, you keep finding more, and more.

Ultimately we will find things we like, or are willing to suffer and cover up (true in every community).

It's just how open minded we really are.

Re: Go is amazing, period.

#209
post #205

Earlier quoted context omitted.

Lisp has been having all these for five decades now and those features are done fast. http://shootout.alioth.debian.org/u32q/benchmark.php?test=al...

So much for Lisp as the ultra-expressive, compact language, I guess... Impressive speeds, though.

Well, the link to the shootout statistics is probably not the best demonstration for Lisp speed/memory consumption/SLOC count relation. If you look into the Lisp sources there you will see that there are lot of things precompiled for the sake of reducing the execution time. Here's where the extensive memory usage and source size come from.

I intended to say that Lisp's and Go's both performance and succinctness in the wild are probably on par. But Lisp is already there for a long time.

Re: Go is amazing, period.

#210
post #187
post #176

Earlier quoted context omitted.

Yes there are, they are known as user space threads or fibers.

User space threads don't run in parallel, i.e. they don't take advantage of multi-core CPUs and can be blocking. Fibers are for cooperative multitasking so no parallelism either. Goroutines are multiplexed as needed onto system threads. http://golang.org/doc/GoCourseDay3.pdf So they are a bit different, in the spirit of Go: they make for a simple and general solution to both parallelism and concurrency. They combine…

As an aside: watching Pike's talk on lexing and parsing in Go really hits this point home. It shows how language support for cheap threads (goroutines) and channels really change the way you come up with an algorithm.

http://www.youtube.com/watch?v=HxaD_trXwRE

Post reply on HN