[bitc-dev] Primary type arithmetic
Shawn Garbett
shawn_garbett at yahoo.com
Sat Feb 5 16:26:25 EST 2005
--- "Jonathan S. Shapiro" <shap at eros-os.org> wrote:
> On Fri, 2005-02-04 at 14:22 -0800, Shawn Garbett
> wrote:
> > How about: ring+, ring-, etc.
> >
> > Shawn
>
> And then the others would be tip+, tip-, etc?
>
I was thinking more like the following:
+, -, etc all double the word size. The static type
checker would catch any usage violating this. Then for
wrap around, aka a ring, ring+, ring- etc. Then for
exceptions on overflow or underflow, have bounded+,
bounded-, etc.
If the static type checker could give a custom message
for type violations of +, -, then the programmer could
be steered toward his possible intentions. The usage
of ring and bounded, are somewhat self-documenting.
Shawn
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
More information about the bitc-dev
mailing list