Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
NateDad
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
66 ms
·
661.
▲
by
NateDad
13y ago
Or you just don't need polymorphic containers that often (other than the ones that go already gives you).
662.
▲
by
NateDad
13y ago
What's nice about the go implementation is that it can trivially accept a function or a type with the right function.
663.
▲
by
NateDad
13y ago
One of the nicest things about Go interfaces is that they encourage SMALL interfaces. In explicit interface implementations, you end up throwing everything including the kitchen sink in the interface, because you might need it somewhere th
664.
▲
by
NateDad
13y ago
I think this is really a problem that exists beyond interfaces. For example, even if you had these two concrete types, and both had close methods, how would you know when to call one close versus another and what they do? This kind of con
665.
▲
by
NateDad
13y ago
Heh, I was wondering that myself, but I try not to get too hungup on votes :) Per project is just going to be a pain in the butt, honestly. It means you'll need to constantly swap out the gopath, and there's really very little ha
666.
▲
by
NateDad
13y ago
Ahh, that's cool, I didn't realize Rust could do that. Though it does still require you to write the thing that tells the compiler their type implements your interface, right? Not a huge deal, but it's still essentially like
667.
▲
by
NateDad
13y ago
This is not an issue in any kind of real code written by a human being. When would you ever pass a cowboy object into a screen painting function? You'd never do this: cb := cowboy.New() screen.Paint(cb) Anyone who wrote t
668.
▲
by
NateDad
13y ago
[moved below to be in reply to the correct post]
669.
▲
by
NateDad
13y ago
No, it really doesn't happen a lot. If it does, you're doing it wrong.
670.
▲
by
NateDad
13y ago
It's useful in go, because it means you can trivially turn a bare function into a type that fulfills an interface, which makes your function more flexible - it can easily take either a type with a method or just a method.
671.
▲
by
NateDad
13y ago
It is common to say "Foo implements the Fooer interface" in the doc on the function. Also, looking up what interfaces a type implements is 1.) impossible (depends on what other interfaces exist in the universe), 2.) pointless -
672.
▲
by
NateDad
13y ago
Please don't call it java lite. Yes, it targets many of the same projects you might write in java, and it has garbage collection, but it's very different from java in the feel and the resultant code, and nothing "lite"
673.
▲
by
NateDad
13y ago
Not sure what you mean by other ways to tackle the dev environment. You need GOPATH, it's totally non-optional for any nontrivial code. Try it for a bit before you look for an alternative, it's actually quite elegant.
674.
▲
by
NateDad
13y ago
Downvotes, really? Someone posts a bug that's already been reported AND FIXED /before/ release, and yet they word the HN title as if it's a current bug just to get people to click on it, and to get the anti-ubuntu crowd
675.
▲
by
NateDad
13y ago
I think you should be able to see the fix here: https://code.launchpad.net/~andyrock/unity/fix-1308572/+merg... I don't know exactly how the fix prevents the problem, though. As for "how this could
676.
▲
by
NateDad
13y ago
Old bug is old. But nice clickbait and up vote fodder.
677.
▲
by
NateDad
13y ago
Yes, because Apple or Trello are much better names. Honestly, I clicked the link solely because I thought "damn, waffle.io is an awesome name". Also, I think hooking a kanban board up to github issues is great. Not mind blowing,
678.
▲
by
NateDad
13y ago
You need to clean up the wording some. When I first read Clicking that badge takes anyone to your public waffle.io board where users can view and edit tasks. It sounds like random github users can decide what tasks get worked on.
679.
▲
by
NateDad
13y ago
Many gophers hate magic. ORMs are specifically magic, and therefore not very popular with many gophers. Many gophers have a lot of experience in other languages with ORMs and have been burned by them on many occasions. I like to say - ORMs
680.
▲
by
NateDad
13y ago
I'd heard they were a heavy perl shop, but that might have been more backend stuff than frontend stuff.
681.
▲
by
NateDad
13y ago
Where's #5 - moderation nazis? Often have overlap with #3, repwhores, they repwhore in order to get high enough reputation to get the power to do moderate as they see fit... note that #5 may think they're in camp #1, but they err
682.
▲
by
NateDad
13y ago
It has been stated that there will be videos available, but I'd not expect them until next week sometime (when the organizers get home and have recuperated).
683.
▲
by
NateDad
13y ago
I was just thinking this. Google+ is much more like twitter, where you can follow people to see what they're saying, and there's not necessarily a reciprocal relationship. I also post publicly to Google+, like Twitter, and unlik
684.
▲
by
NateDad
13y ago
Sorta impossible. You can't suck values out of the current context, even with reflection. You always would need to pass values into a function, in which case you might as well use fmt.
685.
▲
by
NateDad
13y ago
Ahh, oops, that was pointed out below as well. Sorry, I assumed a string was a string, not that this only works in string literals. That's certainly better than letter user-supplied strings work this way.
686.
▲
by
NateDad
13y ago
I guess that's my lack of knowledge of how Ruby's string interpolation works. I assumed it worked like any old string format, which in other languages can use whatever string is passed into the formatting function. It sounds like
687.
▲
by
NateDad
13y ago
For what it's worth, I do think it's more readable, but it's just not a good idea. It's too easy for people to inject variables into their strings and get your code to print out data that's in memory. map, reduce,
688.
▲
by
NateDad
13y ago
Uh, grabbing variables out of the current scope to format your string is most certainly magical. It's also way less explicit than actually passing variables into a formatting function. It might be a little harder to read, but that
689.
▲
by
NateDad
13y ago
I'm actually hugely not a fan of magically rendering code variables in strings. It's super error prone, and way too magical. If you really want named variables in format strings you can make a template like "My name is {{.Na
690.
▲
by
NateDad
13y ago
Testing can be more difficult in some cases, if you haven't carefully structured your code. In python you can always monkey patch whatever outside dependencies you have, whereas in Go, you can't do that without structuring your c
More ›