Perl is worse!

Steve Lamb grey at despair.rpglink.com
Fri Jul 28 11:23:38 EDT 2000


On Fri, 28 Jul 2000 14:27:58 GMT, Grant Edwards <ge at nowhere.none> wrote:
>If I typed "1", that means I wanted a word, a printible string, and _not_ an
>integer.  If I wanted an integer I would type 1 instead of "1".  If I want to
>convert a string to an integer or an integer to a float or a float to a
>string, then _I_ will do it. I do _not_ want the language to make WAGs about
>what I meant when I typed something.

@names = ("Bob","Bob","Bob","Robert Paulson");
@occupation = ("Uncle","Uncle","Uncle","Mayhem");
$index = 0;
foreach $name (@names){
  $done = 0;
  $x = 0;
  while (!$done){
    if ($members{$name.$x}){
      $x++
      next;
    }
    else{
      $members{$name.$x} = $occupation[$index];
    }
  }
}

    Your argument completely ignores cases like the above, doesn't it?  Where
you want to have a counter incremented (math function) but need to use it in a
string constantly.  Simplistic example, yes, but a valid one.  Why force the
programmer to do constant switching to do such a simple thing?

>I meant what I typed.  If not, I'll go back and fix it until
>what I typed is what I meant.

    And I meant what I typed and do and I don't need the language telling me
that I'm the stupid one.

>There's nothing "wrong" with it.  I just don't want it to happen. The people
>responsible for designing the language apparently didn't want it to happen.
>Choose or invent a language that matches what you want.  Nobody (sane) claims
>that a particular language is the best one for everybody or for every
>application.

    Exactly my point.  I don't like it but I'm not asking for it to be
changed.  I'm just a little tired, in all of what, two days, of people putting
down another language for doing something which /they/ consider wrong.  I
consider it wrong in Python not because I'd like to see different, but because
I was told Python doesn't have that ambiguity when it does, that it doesn't do
conversion, when it does, that it doesn't do things "automagically" when it
does.  I'm pointing out that it is just as ambiguious in its own way and that
I personally consider it wrong but, as I stated in one message, I will learn
to use that.

>I don't think it makes sense to do so.  If I explicitly denote an object as a
>string (e.g. "1"), then I want it to be a string and I want it to _stay_ a
>string.

    Because you're thinking in types.  I've stated that I don't like thinking
in such primitive terms.  I don't consider 1 an integer, a string, a
character, a float, a complex or anything else in and of itself.  I take into
account the context of the operation.  You don't.

-- 
         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