4 ms·
The longevity of Go is also a thing. I have not encountered a single Go project that used to compile but now doesn't because it hadn't been touched. Go is in m
by fredrikholm 2y ago
The longevity of Go is also a thing. I have not encountered a single Go project that used to compile but now doesn't because it hadn't been touched.
Go is in many ways leap years ahead of most AOT languages I've used in anger. Yes, sometimes you miss XYZ, but seldom is that an issue outside of personal preferences.
What you do get though is amazing tooling and little-to-no downtime. Builds basically don't take any time, tests run past, pipelines are quick.
go test ./... finishes faster than you can print Determining projects to restore... to the screen. It's a very liberating experience that is hard to go back from.
- pjmlp 2y agoStill leaves a lot to be desired versus Object Pascal from Apple/Borland days, or Delphi afterwards.
- tashmahalic 2y agoWhat makes those better?
- pjmlp 2y agoThe language features, designed for full stack systems programming, IDE tooling, the frameworks bundled with the compiler, first class support for binary libraries ecosystem, no culture against modern times...
- metadat 2y agoPeople used to whip up Delphi GUI apps in an hour or two. I'm not sure how to achieve this so efficiently with "modern" tools and languages. Maybe Python, but it doesn't compile to a static bin.
- pdimitar 2y agoAgreed 100%. I have my very real pet peeves with Golang -- lack of sum types and thus no exhaustive pattern matching is the top one -- but I can't argue with results. Every time I wanted to whip up something quickly, Golang has gotten the job done and then some.
- fredrikholm 2y agoI've gotten far with type switching on an interface that amounts to a single function that does nothing. Unfortunately it does nothing in terms of exhaustiveness, but it effectively gives you sum types which IME are so, so much easier to work with than state pattern or other inject-an-object-abstractions. Not having to design an API (that later leaks) is rewarding enough. It's strangely efficient as well. I've experimented with implementing sum types via tagged C-style unions and at every (ad hoc, micro) benchmark I've tried them against, type switching on an interface comes out on top.
- pdimitar 2y agoCan you point me at an article that demonstrates Golang type switching? Does not ring bell at the moment for me so I'd love to see the code.
- assbuttbuttass 2y agohttps://go.dev/tour/methods/16 https://go.dev/tour/methods/16
- pdimitar 2y agoThanks, for some reason I never stumbled upon this. Very valuable, I am bookmarking it.