[Oberon] Clarifying type compatibility in Oberon-07
andreas_pirklbauer at yahoo.com
Wed Oct 11 15:52:19 CEST 2017
> As pointed out by Diego, ARRAY 12 OF INTEGER is a type constructor which
> creates a new type, whereas INTEGER is the name of an existing type. So
> in code A the variables have different types, and in code B they have
> the same type.
Understood. And... good point. But one still needs to *define* what the
assignment rules should be in both cases. *One* sensible choice (which
is the status quo in Oberon-07) is to assume structural equivalence for
basic types and name equivalence for structured types such as arrays and
records (except for open arrays). This particular choice kind of draws
a(nother) clear distinction between the two, also when it comes to
assignment rules. But it is not the only choice. Hence this discussion.
> (Andreas, for some reason all your messages consistently end up in my
> Gmail spam folder. I don't understand the reason for this.)
> -- August
I have no clue. I hope it’s not related to the content ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon