DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Union Types and Option Types

Quality: 8/10 Relevance: 9/10

Summary

This technical blog post explains union types and the specific case of option types in Copper. It covers design constraints (no nested unions, order sensitivity, and incompatibility between unions), practical usage patterns (T|Nothing, T|Error), and runtime techniques like as checks, notNil, or else, and early returns. The author reflects on the trade-offs and questions whether the added complexity is worth it for a minimal language.

🚀 Service construit par Johan Denoyer