Content pfp
Content
@
0 reply
0 recast
2 reactions

Gabriel Ayuso pfp
Gabriel Ayuso
@gabrielayuso.eth
These are a big contrast with Go which is such a barebones language although I do love struct field tags and reflection. They also recently introduced genetics which I haven't used much yet.
10 replies
0 recast
26 reactions

Cassie Heart pfp
Cassie Heart
@cassie
Arguably go's generics aren't "real" generics anyway, they're missing out on a lot of what can make them a powerful language feature, so you're not missing much by not using them, usually.
1 reply
0 recast
3 reactions

Gabriel Ayuso pfp
Gabriel Ayuso
@gabrielayuso.eth
In what way are they not "real" generics? What are they missing? Each language has different capabilities with genetics but the foundation is compile-time type checks and constraints right?
1 reply
0 recast
1 reaction

Cassie Heart pfp
Cassie Heart
@cassie
One of the most expressive aspects of generics is how it enables a more ergonomic way to declare the transformation of types. Unfortunately, the critical piece, that receiver methods cannot use a generic type parameter different from the receiver's type parameters means a lot of workarounds are needed. https://dev.to/chrismwendt/limitations-of-go-generics-5834
0 reply
0 recast
1 reaction