3 ms·
I think a lot of what go has going for it is in static compilation. Things just work. The C# community leans a lot further from open source (paid libraries vs.
by withinboredom 3y ago
I think a lot of what go has going for it is in static compilation. Things just work. The C# community leans a lot further from open source (paid libraries vs. free).
- neonsunset 3y agoGo receives so much unjustified good will it is almost unbelievable... Either way, if you do look at current state of .NET ecosystem, you may get surprised. But I guess, such is the perception of the public that may have read a bit too much into Go's promises (it would have abysmal performance should FASTER have been written in Go) - C#, seen as less popular weird Java, is now an underdog after all (look at Github LOC statistics).
- withinboredom 3y ago> Go receives so much unjustified good will it is almost unbelievable... Yes. Yes it does and it really is annoying. I can't tell if it is the language or just people not deeply understand the abstractions it provides because it doesn't use sane defaults (or the defaults are geared towards high-throughput, google scale nonsense). I help out a lot on FrankenPHP, and lately I've been digging into a weird bug, deep in Go, that causes FIN_ACK packets to get delayed by hundreds and hundreds of ms. There are so many layers of abstractions (nearly 100) to dig through. I know for a fact in the C# there are less than 10 to the CLR, then after you can rule out the language, you are just tracing IR. But no, I'm digging through hand-written asm, hunting for a bug or at least figure out how to report it with enough information that it doesn't sound like "my email can't be sent more than 500 miles" (google that one btw).
- apgwoz 3y ago> I've been digging into a weird bug, deep in Go, that causes FIN_ACK packets to get delayed by hundreds and hundreds of ms. Just going to put it out there: have you considered the problem might actually be [Nagle’s Algorithm](https://en.wikipedia.org/wiki/Nagle's_algorithm) https://en.wikipedia.org/wiki/Nagle's_algorithm)? This algorithm is the source of 10s of thousands of hours of wasted debugging time of “weird bugs related to latency of networking.” Even the “greats” have wasted time debugging something that ended up being “I forgot about Nagle.”
- withinboredom 3y agoYes. Go doesn't even offer the ability to use Nagle's algorithm: https://withinboredom.info/2022/12/29/golang-is-evil-on-shitty-networks/ https://withinboredom.info/2022/12/29/golang-is-evil-on-shit... Nagle's algorithm is dealing with connections. These are FIN_ACK. Meaning the connection was told to close and we need to ack the closed connection.
- kjksf 3y agoOf course it does: just call TCPConn.SetNoDelay(false). See https://github.com/golang/go/blob/master/src/net/tcpsock.go#L258C19-L258C29 https://github.com/golang/go/blob/master/src/net/tcpsock.go#...
- withinboredom 3y agoYou have to get access to the TCP connection first ... which, once you get more than a few layers above that, it is impossible to get to.
- jddj 3y agoWe've arrived at a weird spot. There's a lot of very good software written in Go now. Much of that software could benefit (performance wise, at least, leaving ergonomics aside due to subjectivity) from being written in C# instead. But does Go deserve some credit for being associated with those projects, or was it marketing and the Google effect? .net AOT is still quite young, so maybe the tide could turn somewhat.
- ReflectedImage 3y agoI think language simplicity is a blind spot for most developers. Programming languages shouldn't be judged just based on their performance (otherwise assembly language would be #1) but also how simple they are. The simpler the better. Go is simpler than C# and that's giving it the advantage over C#.
- neonsunset 3y agoThat’s what makes it worse. Go was designed, in a way, as a toy language to solve the assault on the codebase quality by all the fresh graduates Google was hiring. I’m not joking - this is paraphrasing Rob Pike. Go is a language that wastes my time.
- withinboredom 3y agoThere's also cgo. Say what you will, but an easy-to-use way to reach into highly performant libraries and existing code was smart from a language design perspective. But yeah, other than that, I agree with you.
- ReflectedImage 3y agoSoftware developers tend to be far more productive and write less bug filled code in "toy" languages. Progamming language complexity is usually just plain bad for developers at any skill level.
- neonsunset 3y ago
- zer00eyz 3y agoThere are good reasons to give Go good will: Simplicity: Editor, GitHub, golang download. I have a working dev env for a LOT of use cases. Sudo apt install vim git wget tar. wget golang, untar, set env var. I have a script to do it for me on Debian boxes. Python, ruby, php are pretty close. IM guessing C# is a bit more complicated but not by much. Dependency and library management. GO wins vs python(venvs), ruby, node, php... go mod and how it deals with pinning, pulling from GitHub. Again I dont know what C# has here but go feels both magical, and easy to understand on this front. go build / go run. The fact that is this easy and fast to get to a running binary is impressive. I had a badly behaving container the other day and the residents of it were not giving back helpful errors. One go program (sub 100 lines) later I was getting usable error messages and quickly worked through the network issues. There are plenty of go apps that work like this! Mediamtx is great (RPI cam server) just grab the binary blob and go... The same thing in python is gonna be a lot more complicated. Testing: A friend of mine and I recently started a project together and his commentary after coming from working on large ruby and node projects is "how is this testing this fast". GO is eating its own dogfood here with its concurrency model. IM guessing that, C# can run the same way. Golangs good will isnt because it is the best at something. If were comparing features go is gonna come in 2nd or 3rd or 4th every time. Thats the thing, go is consistently very good at feature "X". It's not the best but it remains in the top 5. Speed, concurrency, compile time, ease of setup, ease of deployment, portability, scaling... Golang is the Toyota of programing languages. Lovable in its reliability.
- withinboredom 3y agoWhy do you bother commenting if you don't have any experience in the other language? With C#, you literally just `apt install` the cli and it keeps up to date. I write go every weekend, and spent years in C#. I still don't know how to properly install go and I have to run it in docker containers. It's so undocumented (or rather the documentation was lacking at least a few years ago and I've not bothered checking because my workflow works for me), that I got lost as a new go dev. As far as building and running ... C# is on par with Go. There's really not much difference, at least from the cli. Editors ... I dunno. I pay for a visual studio license and the IDE is simply magical (esp with resharper). I use goland for go, and these two IDEs are barely comparable in some respects. The testing story in C# is something to be desired. I would rather build a random project to test my code than write tests in C#. It's a mess over there. But yeah, if I were to start a project completely from scratch, I'd choose PHP over either of them, so maybe I don't know what I'm talking about. I'll see myself out.