Python version of IQ has been updates (IQ v0.34.python)
Kirk Strauser
kirk at strauser.com
Tue Jun 19 11:40:21 EDT 2001
At 2001-06-19T13:40:46Z, "Alex Martelli" <aleaxit at yahoo.com> writes:
> "Kirk Strauser" <kirk at strauser.com> wrote in message
>> Perl's RE syntax is designed by and for people who have pretty much
>> mastered the subject elsewhere.
> And where would that "elsewhere" be?
College, for starters. I had a solid grip on RE's before I ever met Perl.
Note that I'm not asserting that *my* experience implies similar results for
anyone else.
>> Then again, I'm more experienced with C, C++, Java, and other similar
>> languages.
> More experienced than whom?
You read that wrong - the proper question is "more experienced than at
what?", to which the answer would be myself at Ada, FORTRAN, Lisp, ML, etc.
Perl was comfortable to me because of my particular background. I picked it
up because 1) it's what we use at the office, and 2) for whatever reason, it
was an easy step for me.
>> You can write C in Perl if you feel comfortable with it.
> Not really, since for example in Perl all your variables need
> a leading '$' which C does not require...
I understand what you're saying, and I wouldn't hope to imply that Perl is
exactly like C. However, the following (working) code snippet should be
transparent to the casual C coder:
$seconds = time();
printf("%d seconds since the epoch!\n", $seconds);
Sure, there are fundamental differences, but a non-Perl coder could probably
maintain the lines above if they had to.
>> They are also similar to the `perlcc' command that ships with Perl 5.005
>> and higher. Specifically, perlcc generates C source that, when compiled,
>> acts exactly like the original Perl.
> Is the Perl 5.6 manual page wrong, then? It says:
> """
> The whole compiler suite (`perlcc' included) should be considered very
> experimental. Use for production purposes is strongly discouraged.
I don't think our statements are contradictory. perlcc generates C code,
and it is currently experimental; those states can co-exist. Note that I
did not pass judgement on perlcc's usability. I merely stated that it
currently exists and is shipped with the main Perl distribution.
>> Same with Perl. Use the appropriate class, create a URL-fetch object,
>> then execute it. Read the results just like any other filehandle.
> It's not quite the same, if you need to do three steps in one case and one
> in the other, although it's no doubt close.
OK, skip the creation step and call the functions directly.
Honestly, Alex, I never meant to disparage Python in any way. Although I
haven't personally used it, people I trust claim that it's a great
language. I just happened to have a lot of Perl experience, and someone
asked a question for which my answer was "try Perl!". I respect that your
answer is different, just as mine may very well be in the future.
--
Kirk Strauser
More information about the Python-list
mailing list