Re:Everyday hassles in Go
by friendly_chap on Tuesday December 30, 2014 @08:23AM
(#8814460)
Did you miss it when you were working on larger codebases? The library you mentioned clocks at 500 LOC, and while the LOC metric is pretty inaccurate, it takes a lot more time to really miss language features.
No. I didn't. I have around 2K public LOC in several projects (I can't check now my private projects, I guess I had typed more than that) but I would trust better NateDad's experience.
I have two years of sustained Go usage (since end of 2012) and never missed them.
I've been working on Juju for 18 months, which is over 250k LOC and have not missed generics at all.
Re:Everyday hassles in Go
by colin_jack on Tuesday December 30, 2014 @09:14AM
(#8814626)
"I realized that if you miss generics in Go, your code is trying to cope with too much."
Was wondering what you mean by that (not disagreeing just interested)?
I meant that if you miss generics, your code is probably too complex.
Re:Everyday hassles in Go
by colin_jack on Tuesday December 30, 2014 @10:33AM
(#8814947)
Sorry yeah I get that, but in what way?
Indeed, they are useful. I use them in Java every time I find a good reason to do it. So, I should say in another way: I don't miss generics in Go.
Given my experience [0] in Go in the last years, I realized that if you miss generics in Go, your code is trying to cope with too much.
I didn't miss them when I developed Mergo [1], a simple library to merge structs. I think we all agree if we should rewrite this in Java (or other language with similar type system) we would use generics at some point.
[0] https://github.com/imdario?tab=repositories
[1] https://github.com/imdario/mergo