@bonifartius Yeah, right... Good luck when googling "go" and generic programming terms, and that is part of the problem with it. Perhaps Google/Azure/DuckDuckGo have learned that you mean "go language" when you write "go" but I get random stuff. It is even worse than "C" when it comes to searching.

@niclas i search for golang too, but that's just to accommodate the search engines. i remember the times where "python" would give you the actual snake as first result ;)

@bonifartius But, it is not my main complaint. It is that it is too easy to make silent mistakes, especially with reference operator (or whatever you call it - "*"). Forget that in one place and compiler is happy to make copies of your structs and 100,000 instructions later have a nil, and one goes "Huh???"

@niclas maybe try "go vet" and "golint", those are pretty good at catching stuff which is commonly a mistake.

i'm not really sure what error you mean without code, if it makes copies of your struct because it isn't a pointer you can't have nil as value. nil can only happen with pointers, slices, maps and interfaces.

Follow

@bonifartius boiled down to the essentials;

func (c Client) Initialize(params []string)

instead of

func (c *Client) Initialize(params []string)

Whoever thought that this is a good idea, should be shot when sighted.

And then the other big issue is the mental gymnastics between struct types and interface types, that somehow are "connected" via function signatures. As natural as polar bears in the Sahara.

· · Web · 2 · 0 · 0

@bonifartius All in all, GO feels like a big step backwards, when it comes to syntax and memory model abstraction.

@niclas you can think of the method receivers as syntactic sugar, they are just another way of giving the first parameter. where you just like in c have to decide if you copy the value or copy a pointer to the value. the compiler can't decide that for you, it depends if you need to modify the methods receiver or not.

go interfaces are just a list of method signatures a type (can be any type, not only structs) has to implement to be usable as a value of this interface.

struct types and interfaces are composable which is quite different from other OO languages. that might be a source of problems if you expect it to behave like those.

@bonifartius
> that might be a source of problems if you expect it to behave like those.

I expect them to behave.

In C, AFAIK there is only "pass-by-value" and I have to be explicit at both ends if I want to simulate "pass-by-reference" by using pointers (still a value).

@bonifartius Back in the 1980s, the C compilers had similar problems. No type checking for method calls, for instance.
And with GO it "feels" like I am back in those days. I had the same "feeling" when trying out Objective-C a decade ago. Steps back to a horrible time.

@bonifartius But enough of this. I have to struggle through. But can still HATE IT.... .com

@niclas
> But can still HATE IT

IT in general is something to hate :P

Sign in to participate in the conversation
Angry Today?

Angry People are Most Welcome! Vent your frustration and go nuts on things that irritates you.