C# is introducing union types in .NET 11 Preview 2, a feature that allows variables to hold one of several distinct types. The addition addresses a long-standing gap in the language's type system.
Union types enable developers to explicitly declare that a value can be one of multiple specific types, improving type safety and reducing reliance on null checks or object casting.
The feature works through discriminated unions, where each type option is clearly defined. This approach has proven valuable in languages like TypeScript, Rust, and F#, where it helps catch errors at compile time rather than runtime.
Developers can now write more expressive code by using union types in method signatures and variable declarations. The compiler ensures values are handled according to their actual type, eliminating entire categories of bugs.
The implementation in C# brings the language closer to modern functional programming patterns while maintaining backward compatibility. The feature appears in .NET 11 Preview 2, with general availability expected later in the release cycle.
Mozilla will enable JPEG XL image format by default across all Firefox 157 platforms. The move brings broader support for the next-generation image codec to mainstream browsers.
Paul Graham suggests aspiring technologists should prioritize learning large language model development fundamentals. The advice sparked significant discussion across tech communities.
Protocol Labs is ending active maintenance of IPFS, the decentralized file-sharing protocol, signaling a shift in the organization's priorities. The decision affects the core team at IPFS Shipyard.
Microsoft has confirmed that .NET Framework updates released in August 2026 Patch Tuesday are breaking printing and PDF export functionality in WPF applications.