Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
NateDad
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
1.
▲
by
NateDad
7y ago
....in Go?
2.
▲
by
NateDad
7y ago
Man you Go haters LOOOVE to trot out that quote from 2014. But you know what, go is easy to learn, and that's been awesome in my experience. I can (and have) hired people who have never written go, and they're productive in a we
3.
▲
by
NateDad
7y ago
Oh, oops, yeah, I misread "some" as "same". Denoting what contract they obey is just the name, isn't it? T1 and T2 are names of contracts. I guess what you can't do by just using the contract name is say that
4.
▲
by
NateDad
7y ago
They'd both be T1 in that case. T1 T2 means they're different contracts.
5.
▲
by
NateDad
7y ago
not if each one can fail. What if call #1 and call #3 can return the same error.. how does the caller know which one failed? This is the same as wrapping a bunch of calls with a catch (Exception) ... you lose context of what failed and c
6.
▲
by
NateDad
7y ago
I really dislike method chaining. I'd much rather have 5 lines than 5 chained methods. If that's too much to read, you can always encapsulate it in a well-named function.
7.
▲
by
NateDad
7y ago
Try makes it worse because it is so easy to miss when reading the code. Because it encourages nesting function calls, which is harder for a human to parse than separate statements across lines. Because it means you can exit the current fu
8.
▲
by
NateDad
7y ago
Functions are a thing. Interfaces are a thing. I have literally never, in 6 years of full time go development, just copied and pasted code for the purpose of making it work with a different type. Nor has anyone I have worked with in that ti
9.
▲
by
NateDad
7y ago
A simple text search will find it every time. Since Go code should always be formatted, it's pretty trivial to search for `type HTTPServer` or `func NewServer(` ... even over fairly large codebases this will give few enough hits that y
10.
▲
by
NateDad
7y ago
I've worked on a million line Go code base and a dozen open source projects and many typical backend services, and interface{} is actually quite rare outside of something like json serialization or string printing - i.e. fmt.Printf(msg
11.
▲
by
NateDad
7y ago
This is just not true. 2.5 years ago when I was looking for a remote-only go job, I had so many positions to look at, I had to put them in a spreadsheet. None of them were in silicon valley . Many many places are using go here and there. Fr
12.
▲
by
NateDad
7y ago
I worked on a million line go codebase for 3.5 years. It was readable and consistent and actually quite nice.
13.
▲
by
NateDad
7y ago
names = append(names, "Bob") .... that's really it. Will it have the same backing array as it did before you did append? Maybe, maybe not. Should you care? Absolutely not, and if you do, you're probably doing s
14.
▲
by
NateDad
7y ago
C# has the feature-bloat of C++, except with a garbage collector. (I wrote C# for 9 years and even when writing it 40 hours a week, I still had trouble keeping up with all the features that continually came out)
15.
▲
by
NateDad
7y ago
I wrote a generic version of cog that can use any language as the generator code. It's called gocog, because it's written in go, but once compiled, it's a static binary, and you don't need go on the host machine. https
16.
▲
by
NateDad
7y ago
I think the author understands exactly what they're talking about, and they're not talking about being employee #1-3. Most people, when they hear "work at a startup", they're talking about being employee #10-30. No
17.
▲
by
NateDad
7y ago
C++ versions are never correct
18.
▲
by
NateDad
8y ago
If you care, you can't realistically forget. There are linters that will find your missed error checks.
19.
▲
by
NateDad
8y ago
Gah, my eyes! Why is the font so huge? And why doesn't zoom change it? I have to like step 5' back from my screen to read it.... Otherwise... I have been writing Go for about 6 years... errors make so much sense to me. Why hav
20.
▲
Mage – make/rake for Go
(npf.io)
8 points
by
NateDad
8y ago
|
2 comments
21.
▲
by
NateDad
8y ago
Getting the wrong password in your password manager happens occasionally. Usually from password resets that somehow don't make it into your password manager. The fact that HN allows accounts without email addresses is the real proble
22.
▲
by
NateDad
9y ago
It's like your own personal google drive / dropbox / git repo It's a content addressable storage system. There's plugins to import or export from various major services like foursquare, twitter, etc. and plugins le
23.
▲
by
NateDad
9y ago
Not sure if you're talking to me. I was saying that NullReferenceExceptions happen a lot more in C# than nil pointer panics in Go.
24.
▲
by
NateDad
9y ago
Yes, which is not error handling. Exceptions automatically handle error propagation, which is not the hard part of dealing with errors.
25.
▲
by
NateDad
9y ago
Your compiler can't handle errors for you. Error propagation is not error handling.
26.
▲
by
NateDad
9y ago
It's common in parsers. JSON parsing can panic (IIRC), as does the go template parsing code. Would they still write it that way today? I don't know.
27.
▲
by
NateDad
9y ago
Sure, and then you have no idea what was executed and what failed. Did you run 9 functions or 1? What do you need to roll back? How do you handle the error? This is the problem with exceptions. They make it too easy to be lazy with your er
28.
▲
by
NateDad
9y ago
Yes, if you use panics for control flow in your package, you need to recover from them and hide that fact from your API. That is not the same as saying that you should recover from any panics that happen inside your library. Unexpected pa
29.
▲
by
NateDad
9y ago
My 7 years of C++ and 7 yesterday of C# and 5 years of go agree with you. Many more nil pointer exceptions in the former and almost none in the later in similar size (large) codebases.
30.
▲
by
NateDad
9y ago
Mage was born of my frustration with people using Makefiles to build Go projects. Makefiles are not cross platform compatible (good luck running them on Windows without jumping through some hoops), they have significant whitespace, they ar
More ›