Okay, since we're finally talking defined math semantics, lets talk the low-level ops.

All our math ops right now just quietly do their thing. If values wrap, truncate, or otherwise fuzz out, we don't do anything special. This is fine, and fast, and what many languages want. It is, however, reasonable to have math ops that are a bit higher-level -- basically throwing exceptions if something exceptional happened rather than quietly proceeding.

What I'm thinking is that we add an O or X (or E, I don't care. I suppose we could get more verbose there too) variant to the basic math ops which checks the result for validity and throws an exception on something exceptional happening.

Only for the basics (add, subtract, multiply, divide, possibly modulus) but it ought to be useful. Folks think it's worth it?
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to