4 ms·
Go rocks for pretty much everything
by jekwoooooe 1y ago
Go rocks for pretty much everything
- osigurdson 1y agoGo routines are very nice. Way better than async await nonsense in other languages. if err != nil {return .., err} gets pretty tedious however. Everything tends to be very mutable / nullable as well which could be better. Also not really any faster than Java/C# - just another GCed language.
- jekwoooooe 1y agoGo can be way faster than those. Garbage collection is not an issue at all if you write efficient code And the error handling is way better than catching stuff because it’s so explicit
- osigurdson 1y agoAgree that values are better than exceptions for error handling. It seems that it could be better though. I don't think Go is faster than C# or Java for the most part.
- pjmlp 1y agoExcept for having a modern type system.
- jekwoooooe 1y agoWhat’s missing? It has generics and robust typing. Man this website must be full of old geezers with all the go hate I see
- pjmlp 1y agoMaybe some Pascal like enumerations, something like this from 1976: type weekdays = (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); DailyActivity = array weekdays of string; Instead of the ridiculous iota/const workaround. You mention generics, but actually they still are quite constrained on capabilities. Robust typing misses out on the famous gotcha with nil interfaces. The error boilerplate, but granted that isn't a typesystem issue, rather grammar and semantics. Package names tied to SCM domains, with a workaround using HTML Meta redirections when they change, and behind our back file rewrites remapping imports.
- mdaniel 1y ago> and behind our back file rewrites remapping imports. I've been bitten/misled by that so many times. How hard is it to just $(find -exec sed) to patch up the imports if you fork a project, versus later finding out oh, so that's why line 50 of some random dep doesn't at all do what it says in the repo If I was Go Dictator For Life I'd make the compiler issue a warning for any replace statement in go.mod
- kristianp 1y agoIt does make you wonder about their thought process, not using 'real' enums for go. I think the language designers were of a minimalist mindset, but Pascal wouldn't be described as bloated by anyone with a computer larger than an original Apple II (it required an add-on card to run UCSD Pascal).