News for hackers. Stuff that matters.
Re:Why Go? Use Racket by jamra on Thursday March 12, 2015 @02:35PM (#9192791)
I'm sorry you lost me after your outrageous claim that one must learn everything about the standard types of Go before one can program effectively.

You should know about how your types are passed around if you are using any language.

The example given was arrays in Go. Arrays are passed by value, but slices (pointers to arrays) are passed by reference. This is very simply described in the Effective Go reading. It's not a hard concept. I don't like you writing off Go with that example. It sounds like you made an emotional decision against the language and are grasping for logical reasons to support your already made decision.

How many people programming with Go pass arrays around? It's an easy lesson to learn.

Re:Why Go? Use Racket by eloff on Thursday March 12, 2015 @02:44PM (#9192869)
There are many valid criticisms of go, but the one presented in this article make no sense. Or maybe only make sense if you're a huge dynamic languages fan and can't stomach static typing. Personally, as someone who used to be a huge fan of dynamic languages like Python, I've sobered up as I've grown older and had to fight with large python and JavaScript code bases. A compiler that is fast with clear error messages is tremendously valuable.
Re:Why Go? Use Racket by Dewie on Thursday March 12, 2015 @03:15PM (#9193069)
If using dynamic typing like Python's is being drunk, then at least Go is like being tipsy - not quite sober, but quite functioning.
Re:Why Go? Use Racket by bkeroack on Thursday March 12, 2015 @04:10PM (#9193493)
Only if you make a habit of using reflection (you shouldn't). Otherwise it's designated driver all the way.
Re:Why Go? Use Racket by thomasahle on Thursday March 12, 2015 @05:07PM (#9193929)
> Only if you make a habit of using reflection Or type switches. Or nearly anything involving interface{}.
Re:Why Go? Use Racket by tel on Thursday March 12, 2015 @04:12PM (#9193510)
Tipsy is probably the most dangerous mode. People feel like they can probably still drive when they're just tipsy.
Re:Why Go? Use Racket by lomnakkus on Thursday March 12, 2015 @05:57PM (#9194220)
No. Drunk driving is much worse. (Yes, people do that -- I mean they actually understand that they are "drunk" and not just "tipsy"... and unfortunately still drive :/.)
Re:Why Go? Use Racket by tel on Thursday March 12, 2015 @08:43PM (#9195036)
Ah, yeah, I wouldn't want to claim that tipsy driving is worse than flat out drunk driving. I only wanted to suggest that there's higher net risk when it's less dangerous but is perceived to be not dangerous at all.
Re:Why Go? Use Racket by chimeracoder on Thursday March 12, 2015 @03:15PM (#9193065)
> I'm sorry you lost me after your outrageous claim that one must learn everything about the standard types of Go before one can program effectively.

I can't help but be amused to see the complaint that Go's type system is, of all things, too complex.

At the time I first picked up Go, Racket was my favorite language of choice[0]. One of the biggest things I noticed about Go was how little I needed to think about types and implementation. Part of this was simply having a static typechecker[1], but part of it is how the rest of the tooling is designed as well.

> How many people programming with Go pass arrays around?

Most people using Go shouldn't be using arrays at all, since they really don't fit most use cases (fixed size and size is part of the type).

[0] For the record, I still like Racket, but I've found I'm undeniably far more productive in Go.

[1] Type Racket exists, but at least at the time, most libraries were untyped, which meant I had to write typed wrappers for everything.

Re:Why Go? Use Racket by nkozyra on Thursday March 12, 2015 @03:04PM (#9193012)
Yes, thank you. This was an instant head-scratcher:

"However, the type system of Go is so complex"

The type system is anything but complex, even in the non-system complaints expressed.

Re:Why Go? Use Racket by Rapzid on Thursday March 12, 2015 @04:32PM (#9193678)
Just a nit, everything is passed by value in Go including slices. Here is an example highlighting why it may be important to keep this in mind: https://play.golang.org/p/VOUJI88PNj .

Regardless of this, I learned Go during the last Stripe CTF and placed top 5 in one of the rounds with it sooo... I don't believe learning to be effective with it takes all that long. It was quite enjoyable to learn as well.

Re:Why Go? Use Racket by jamra on Thursday March 12, 2015 @05:52PM (#9194187)
Not just a nit. You are right. I wrote my comment in haste. Had to take someone to the airport.

I think the essence of my point still stands in that the example the author provides is very shallow and hardly something that stops you from writing Go or even writing any kind of protocol in Go.

Re:Why Go? Use Racket by nulltype on Thursday March 12, 2015 @04:22PM (#9193596)
I think slices are actually passed by value.

From "Effective Go":

"We must return the slice afterwards because, although Append can modify the elements of slice, the slice itself (the run-time data structure holding the pointer, length, and capacity) is passed by value."

Re:Why Go? Use Racket by jamra on Thursday March 12, 2015 @05:54PM (#9194203)
You are absolutely correct. To borrow form another's comment, https://play.golang.org/p/VOUJI88PNj

The slice, however, is a small structure to pass to a function in that you are not performing a copy of each individual element in the slice.