News for hackers. Stuff that matters.
Re:Official proposal for Type Unions in C# by bazoom42 on Thursday August 08, 2024 @06:57AM (#41190085)
Like an enum, a union have a closed set of elements so it can be statically checked all cases are handled.

With an interface, someone could add a new implementation, causing codee to fail at runtime.

There are no comments on this comment yet.