On 2025-12-21 04:22:02 +0000, rbowman wrote:
> On Sat, 20 Dec 2025 05:25:25 -0500, c186282 wrote:
> 
> >    Well, I kind of liked PICK system ... everything was equal, always
> >    represented as a string. Numbers, chars, whatever - instantly/easily
> >    converted between each other.
> >    NO 'types'.
> 
> iirc Perl had 5 copies of a scalar just in case you wanted a string or 
> character instead of an integer or float.

Those would only be filled in as needed, but yes, if you used a scalar
in many different contexts you could end up with one which was a string,
a float, a signed int and and unsigned int at the same time. And
possibly a unicode string, too. I don't remember whether byte string and
unicode string were mutually exclusive. And the values didn't
necessarily have to match. You could have a scalar which was "IV" in a
string context but 4 in a numerical context. This isn't even rare. The
result of a false comparison (e.g. 1 == 2) is a scalar which is 0 in
numerical context but '' (not '0') in a string context.

        hjp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [email protected]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature

-- 
https://mail.python.org/mailman3//lists/python-list.python.org

Reply via email to