
27 Jun
2005
27 Jun
'05
5:40 a.m.
Malcolm Wallace wrote:
Christian Maeder
writes: voidcast v@(VariantWithOne{}) = v { field1 = Void , field2 = Void } Setting field2 only assures type correctness, but the value of field2 would be ignored at runtime.
Exactly what I was proposing.
I know, but how "save" is this. i.e. when you mistype/exchange field names?
I am proposing that it should not be thought of as an error at all.
I think, it is better to get i.e. an overflow error (at runtime) than another runtime error elsewhere. Christian