So... in summary (so far): Minimum requirements are: * Modular types must allow any modulus * Modular types which are modulo-power-of-2 must allow logical and shift operations One remaining question is whether or not to define logical and shift operations for modulo-non-power-of-2. For: it makes the language definition "tidier". Against: it's not a useful feature so why implement it. Personally, I quite like both those arguments, which doesn't help much :) Then we have Andy's points regarding using a resolution function to implement the behaviour: > Among subtypes, I still favor a resolved subtype (extended to variables) approach. It has a smaller impact on the > language, while still providing the needed functionality. I'm not sure it has a smaller impact - I think a new, well-defined type or subtype has fewer potential ramifications than extending the general behaviour of the assignment operation. > If we wanted modular types, we would probably need generic packages that defined the operators, etc. along with > the new types, with the modulus passed in as a generic. I'm not sure we would, if modular types were a first-class language feature (defined in the LRM - which is how I would personally see them) then no packages would be required for the operators or types. Cheers, Martin -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Jul 14 07:10:35 2014
This archive was generated by hypermail 2.1.8 : Mon Jul 14 2014 - 07:11:19 PDT