4 ms·
Yes, and it means (<<) is not closed over Int, which means that you will need to be able to compare instances of Int to instances of Long. Before you know it yo
by toolslive 9y ago
Yes, and it means (<<) is not closed over Int, which means that you will need to be able to compare instances of Int to instances of Long. Before you know it you're wondering what the result is of
>>> -1j * -1j == -1
and
>>> f(-1j * -1j) == f(-1)
where f is some pure function. Some people think it's the road to perdition.
- acjohnson55 9y agoAre you basically saying that programmers want intuitive interpretation of numeric literals, without having to suffix them to indicate their type? This strikes me as a situation where editing programs as plain text holds is back. Most languages have complex and error prone implicit type conversions between numeric types so to keep the text representation of the program looking clean. But if there were a way for the source to contain explicit type annotations on numbers without necessarily requiring the programmer to have to look at them or specify them in most cases, that seems like a much better situation. I think there are many such ways we are held back by plain text representation.