in reply to Re^13: why are hex values not numbers?
in thread why are hex values not numbers?
Requirement? You claim I don't know what the word means, yet like a petulant child, you say "And I'm not gonna tell ya." You can't define your terms in a technical forum? Then don't claim to know them or claim to be capable of judging others' use of the them.
There is a good reason to do it: compatibility with any other language -- in places where other languages allow decimal input (usually at the source level, though also at runtime in interpreted languages), they also allow hex, and, usually octal at the minimum. Perl stands alone in not being able to convert a hex constant in a string when it CAN convert a decimal in the same place.
Potential for silently getting a '0' value for bad-source code? What more do you want? Show me anyplace in CPAN where the person put "0x" in front of a string of hex digits, and they didn't mean that they wanted a hex string.
You are talking about a error in the first place and second, it's a very unlikely error, one I doubt you can find an example for, but if you needed such pickiness, you could have 'lint' complain about such cases. You shouldn't use it as the only reason to block a feature that makes the language easier for others.
This is why perl is dying a slow death -- because no one will support any common sense changes that make things *easier* for new people coming to the language. Instead, the things that do get approved are pinning tails on vars, that, of any method of allowing forced-typing, is the most verbose and most cryptic looking. So much so, that I know no other mainstream language that uses such a syntax (may be out there, but I've not seen such). It won't help outsiders understand perl -- just create more confusion.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^15: why are hex values not numbers? (octal)
by tye (Sage) on Oct 02, 2016 at 05:16 UTC | |
by BrowserUk (Patriarch) on Oct 02, 2016 at 10:56 UTC | |
by Anonymous Monk on Oct 03, 2016 at 07:38 UTC | |
by BrowserUk (Patriarch) on Oct 03, 2016 at 08:38 UTC | |
by perl-diddler (Chaplain) on Oct 03, 2016 at 12:25 UTC | |
by Anonymous Monk on Oct 03, 2016 at 19:38 UTC | |
by perl-diddler (Chaplain) on Oct 03, 2016 at 18:15 UTC | |
by Anonymous Monk on Oct 03, 2016 at 18:31 UTC | |
|