Open giuliolunati opened 6 years ago
I agree that it's weird. But @gchiu and I had once tried changing $6 / $2 => 2
. This received some backlash from earl and was reverted.
In Carl's opinion $ was not really just about money, but it was a type to be used for "arbitrary precision math". From the comments here:
http://www.rebol.net/cgi-bin/r3blog.r?view=0201#comments
You should consider the $ just as a notation that means APM (arbitrary precision math). It is a lexical notation to separate it from decimal (FPM). We could have used some other notation, but the lexicon does not have many left.
If you read through those comments you can see what you think. In any case, the reason people don't want $6 / $2 to produce 3 is because of the loss of precision that converting to integer has.
That means money type implements APM?
It's original code in Rebol (which Ladislav wrote, I believe), and the datatype is deceptively called deci
:
Red does not appear to support MONEY! yet, so I don't know what their plan is. Especially if they're trying to have notations for cryptocurrency.
I've never used the MONEY! type. For what I'm interested in, I've been feeling like $1 and $2 etc. are more useful for parameter indexing. And I've felt that $true and $false are better than #[true] and #[false]. So I don't have a lot of opinions about it, other than it indicates the kind of thing I feel should be modular in the language so you can load the feature only if you want it.
Wow, so MONEY! is a 26-decimal-precision number! Then we should change the name... Perhaps LONGDECIMAL! ?
No... It allows only arithmetic, no other math functions :-/
Things IMO are wrong: $1 + 1 => $2 (should be error) $1 * $1 => $1 (should be error) $6 / $2 => $3 (should be 3) 6 / $2 => $3 (should be error) (But $6 / 2 => $3 is right)