▲ | GhosT078 3 days ago | |||||||||||||
This tradeoff sounds similar to the choice to use "tagged types" versus "variant records" in Ada. Ada has provided variant records since 1983 and tagged types since 1995 (and both with a very nice syntax). | ||||||||||||||
▲ | wk_end 3 days ago | parent [-] | |||||||||||||
According to this [0] tutorial, variant records in Ada have the downside that you only get an error at runtime if you use them incorrectly, i.e. access data from one branch of the sum type when the actual value is on another. That's a pretty huge drawback. https://learn.adacore.com/courses/intro-to-ada/chapters/more... | ||||||||||||||
|