Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by ChainOfFools on Tuesday May 09, 2023 @06:33PM
(#35881216)
Somewhere in the distant past a second grade me is staring at his math homework and fuming over the frustratingly ambiguous meaning of the minus sign. Is it an operator? A property? Both?
[ Parent
| on HN ]
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by thr-nrg on Tuesday May 09, 2023 @06:49PM
(#35881361)
Math notation is to mathematics as poetry is to English.
The only acceptable grammar for math is s-expressions.
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by Conscat on Tuesday May 09, 2023 @11:22PM
(#35883269)
Well, idiomatic C++23 is an acceptable math notation too.
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by thr-nrg on Wednesday May 10, 2023 @05:09AM
(#35885265)
No it isn't. S-expressions are the simplest serialisation or trees. Trees are the simplest grammar that can encode mathematical expressions. C++ by comparison is as usable as doing cube roots using roman numerals.
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by Dylan16807 on Tuesday May 09, 2023 @07:45PM
(#35881806)
It's only ambiguous if you think it does two things. I say it does one thing.
-4 always removes 4, whether or not there is a number to the left.
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by ChainOfFools on Tuesday May 09, 2023 @07:54PM
(#35881878)
The problem arises with the way that this stuff is taught at a very elementary level, which then needs to be thrown away and relearned long after intuition and habits have formed around the old model. As an adult my reasoning is that it does indeed only do one thing: negation. it doesn't take anything away at all, if anything it actually adds information. Negating a four doesn't take it away, it just specifies a different (inverted) mapping of a given value with respect to zero. And this is still a very naive take, as someone with no background in number theory. But it's much more useful than say, Billy has four apples, he gives three to Mary, etc.
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by Qem on Tuesday May 09, 2023 @08:32PM
(#35882152)
We could make the minus sign go away if we adopted a balanced base (e.g. balanced ternary), that has both negative and positive digits. That way, just looking at the digits would make evident if a number is positive or negative, without any need for a minus sign.
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to...
by RhysU on Wednesday May 10, 2023 @07:43AM
(#35886044)
I love that such systems were built once: https://www.wikipedia.org/wiki/Setun