Perl is worse!
Grant Edwards
ge at nowhere.none
Fri Jul 28 11:34:27 EDT 2000
In article <slrn8o397m.3ok.grey at teleute.rpglink.com>, Steve Lamb wrote:
>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'm not ignoring that case. I'm stating that I want to do the
conversions explicitly rather than implicitly. Why do you find
it so difficult to believe that "I want X" when I tell you "I
want X"? I'm _not_ trying to tell you that "you want X" or
"you should use X". I am trying to tell you that "I use X"
because "I want X".
>>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.
Fair enough.
--
Grant Edwards grante Yow! I was in a HOT
at TUB! I was NORMAL! I was
visi.com ITALIAN!! I enjoyed th'
EARTHQUAKE!
More information about the Python-list
mailing list