Perl is worse! (was: Python is Wierd!)

Steve Lamb grey at despair.rpglink.com
Fri Jul 28 04:04:45 EDT 2000


On 28 Jul 2000 19:46:29 +1200, Paul Foley <see at below> wrote:
>The distinction you're trying to make (between "types" and "just
>data") is rather foolish.  Data are the things that have types.

    Rather foolish?  For whom?  Humans don't think in "integer" and "long
integers" or "strings".  We think in terms of data whose exact value, "type",
is determined by context alone.

    As a human, type 1.  Character?  String?  Integer?  Floating number?  No,
it is 1 and it can be all of those all on context.  Types are a construct
created to help computers deal with human concepts.  Why, then, when a
language comes along that does a darn fine job of doing the right thing by
defining data as a scalar (it isn't a string, it isn't an integer, it isn't
floating point, it isn't a character, is can be all of them depending on
context) do you call it "foolish" to think in those terms?

>character "a" (Python, sadly, lacks a proper character type);

    I'd consider that a blessing.  Once less artifical construct to get in the
way.

>No; "a" is a string and strings are sequences; 1 is an integer, and
>integers are not sequences.  This particular quirk is in your head.

    No, the particular quirk is in the language by forcing types.  Remember,
all this came about because I pointed out that Python has just as much
automagical "typing" going on as Perl does, it just limits that typing from
what I can see.

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list