2026-09-26 15:27 UTC
@pinskia@hachyderm.io @joe@f.duriansoftware.com
If an Ada record has a default discriminant, you can in fact change the variant by a full assignment (not by individual components, or just the discriminant), so it really is an algebraic sum type. Back when I was programming in Ada professionally, I used that a lot!
Obviously the record can't contain an unconstrained array, as then there is no size that can hold all variants.
Replies (0)
No replies.