News for hackers. Stuff that matters.
Re:Go generics may use square brackets [] not parenthesis () by HideousKojima on Wednesday July 15, 2020 @09:32AM (#23844951)
>Non-nullability requires generics for a result type which is a huge source of complexity. Generics impact parsing, code gen and runtime efficiency.

The C# 8.0 approach to non-nullability doesn't require generics at all (though C# already has a robust generic system). They just made reference types work the same as value types, add a ? if you want it nullable, otherwise it isn't.

I think Rust's way of doing it with Option is probably a better way, but C#'s way of doing it is definitely more accessible to the average programmer.

There are no comments on this comment yet.