Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rogpeppe1
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
rogpeppe1
13y ago
You should check out github.com/niemeyer/qml
32.
▲
by
rogpeppe1
13y ago
i usually do something like this instead: type Config struct { a int b string c float d interface{} } var defaultConfig = Config{ a: 11, b: "some default", c: 55.5, d: new(D), } func f(cfg C
33.
▲
by
rogpeppe1
14y ago
i'd like to see a score system, and some kind of score ladder scheme where you only play people with on adjacent rungs of the ladder. then the folks that are really good don't end up playing against people like me who just crash into themse
34.
▲
by
rogpeppe1
14y ago
> Really, can't I indulge in a sloppy coding style while prototyping something I sympathise with this view, but personally, as a full-time Go programmer, when I've been hacking up little piece of throw-away or explorative code, I've ge
35.
▲
by
rogpeppe1
14y ago
A couple of remarks. FWIW my job is as a Go programmer. The unused variable thing (particularly with local variables) has caught many bugs quickly for me. If there's a package that I find myself always adding and removing, it's easy to writ
36.
▲
by
rogpeppe1
14y ago
If you've got a single package with 700 files (I'm pretty sure that's what he was testing), you're doing something wrong.
37.
▲
by
rogpeppe1
14y ago
actually, the Go tool compiles packages in parallel by default.
38.
▲
by
rogpeppe1
14y ago
"So you can actually just write code like this: do val1 <- someValue val2 <- someFunction val1 val3 <- someFunction val2 someFunction val3 then, if any of the values return an error, it gets propagated t
39.
▲
by
rogpeppe1
14y ago
You get a panic, which can be caught. http://play.golang.org/p/IaTAGizhrF
40.
▲
by
rogpeppe1
14y ago
I've been using acme for a long time (previously vi was my editor of choice). One property of acme that I think isn't so obvious is the way that text becomes higher-order, in the same kind of way that S-expressions in Lisp are higher-order.
41.
▲
by
rogpeppe1
14y ago
An error isn't just about what went wrong - it's also about what you were trying to do when it went wrong, so you can do something appropriate. If you handle exceptions several stack frames up, then you lose that information. Doing things
42.
▲
by
rogpeppe1
14y ago
If you're going to do error handling right in an exception-using language, you really need to catch every exception close to its source, otherwise you won't know how to handle it properly. I think Go's main approach is this: errors are not
43.
▲
by
rogpeppe1
14y ago
To make Inferno run Go efficiently, you'd probably need to add instructions to the Dis VM to do interfaces, channel closing, slice capacities and likely other things I haven't thought of. To make Go run well under Inferno, you'd need to cha