On Wed, 2014-07-09 at 22:08 +0200, whygee@f-cpu.org wrote: > Le 2014-07-09 21:44, Brian Drummond a écrit : > > On Wed, 2014-06-25 at 14:17 +0000, Martin.J Thompson wrote: > >> So, are there any features you would like which are not mentioned? > >> Constraints which do not make sense? > > > > I would agree but I would suggest (as Whygee suggested following his > > experiments) adding shift and rotate operators. > > > > The meaning of these is easy to understand for the modulo-2**n case. > > but > > may require some thought in the more general case (I would suggest > > shift > > on a bit position basis, followed by a modulo operation like the and/or > > operations. > > > > - Brian > > Hello, > why are we spending time on other bases, since they > don't bring speed or ease advantages ? Other bases have uses as counters, minute hands, etc. For these, one could argue that the boolean and shift operators have few if any uses, and I would agree. But if we are providing boolean and shift operators for the special case of modulo 2**n, then we have to do one of: 1) restrict modular types to mod 2**n. Prohibits other legitimate uses. IMO : Just No. 2) Define boolean and shift only for mod 2**n and prohibit for other cases. Ugly irregular language feature. IMO : No. 3) Define boolean and shift only for mod 2**n and leave their semantics undefined for other cases. IMO : that would not be appropriate in Ada. 4) Have well defined semantics for all cases, in such a way that efficiency and implementation burden are tolerable, and that the common 2**n case has the desired properties. IMO : this is the only tolerable option of the first four. 5) Split modular types into two : power of two, and other. IMO : too much complexity 6) ??? - Brian -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri Jul 11 06:36:52 2014
This archive was generated by hypermail 2.1.8 : Fri Jul 11 2014 - 06:37:36 PDT