4 ms·
> Only thing that bothered me was hearing an interview with the Go devs where one of the key devs sounded like Generics would never make its way into Go and it
by BugsJustFindMe 2y ago
> Only thing that bothered me was hearing an interview with the Go devs where one of the key devs sounded like Generics would never make its way into Go and it put me off the way he seemed so adamantly against such a feature
Everything about the development trajectory of Go so far indicates that What Is Right And Good at any given moment is largely determined by whatever makes building the compiler easier and not what makes the lives of external developers easier, until the external developers get loud enough about how the language is failing to learn from the mistakes of the past that the internal team relents with an "ok, ok, you win, our bad".
And if I never see another apologist refrain of "You don't need <x>. Just use this code generator to flood your repo with thousands of lines of project-specific-for-no-good-reason boilerplate" again it will be too soon.
- maccard 2y agoCode generation has a time and a place, but that time and place isn't replacing missing language features.
- XorNot 2y agoI really wish proper enum types would be added. You always codegen them, but it's the same code everytime.
- throwaway894345 2y agoI think most Go devs have been pretty happy with Go’s trajectory. I think it’s mostly the people who aren’t using Go and are unlikely to start using Go no matter its feature set who are the ones who are mostly ignored. It has also been a really good thing that Go “doesn’t learn from the ‘mistakes’ of the past” or else it would have exceptions and monads and lifetimes and inheritance and a Haskell-like syntax. Go isn’t perfect, but it’s wildly more productive in my experience than any other language, and that matters a lot more to me than being able to be maximally expressive or abstract.
- renhanxue 2y agoI've coded golang for four years. Web services. I hated it at the start and I hate it even more now. The generics are miserable to use and are very limited in what they can do, the standard library is awful (database/sql in particular is offensively bad, but you have to use it because all the third party tools rely on its interfaces), there's footguns and dangerous syntax subtleties everywhere, and the idea of the zero values for uninitialized struct fields is to me an even worse mistake than the concept of null. At least if you make a mistake with null the program crashes, which is obvious, instead of just silently doing the wrong thing, which is not. The language claims to be simple; it's not, it's just pointlessly restrictive in weird ways wherever it happens to offend Rob Pike's personal sense of aesthetics. At least it compiles quickly, I guess??? I wish we could use some boring language that works, like C# or Kotlin.
- elvlysh 2y agoMore than one person designed the language than Pike, you know. He's retired. Maybe you can find another member of the devteam to pick on?
- renhanxue 2y agoBoth (for example) Russ Cox and Ian Lance Taylor have contributed some very notably bad ideas to the project, yes. Does rephrasing it to "Rob Pike and people who think like him" make you happier?
- dimgl 2y agoHave you ever used Golang? I have not needed to use codegen once.
- BugsJustFindMe 2y agoIt should be trivial for you to google for go code generation and the cases and reasons for it. That you've personally never done it speaks only to the bounds of the work you've done.
- dimgl 2y agoI’m playing devil’s advocate. Again, I worked with Go in a production setting for 3+ years and didn’t need to do any code generation. Maybe my use case was simple… or maybe it’s unnecessary.
- BugsJustFindMe 2y ago> I’m playing devil’s advocate. https://shkspr.mobi/blog/2019/11/you-are-not-the-devils-advocate/ https://shkspr.mobi/blog/2019/11/you-are-not-the-devils-advo... > Again, I worked with Go in a production setting for 3+ years The amount of time you spent doing whatever you were doing is not relevant. The google search you seek is mere keystrokes away.
- dimgl 2y agoCan you show me? You keep talking about Google search and yet haven't brought up a single example.