Open
Description
This program:
sqrter = (
run = (
-1 sqrt println.
)
)
prints NaN
which was a little surprising to me -- I wouldn't have expected a conversion to a double in such a case. What we've done in softdevteam/yksom#57 is to throw an error in such cases. Admittedly, on reflection, both the NaN
and "thrown an error" behaviour are defensible, though I suspect the latter catches more genuine programmer errors. Maybe something to think about for the SOM spec!