Andrew DeFaria said:
But I didn't write anything before it.
But I did:
"Maybe reread "<
[email protected]>" were I
"clearly wrote: "Depends on what you're doing of course.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
After that I wrote a kind of rhetorical part: "Why would I copy a program
that does already its work perfectly and reinvent the wheel?"
To which you replied (paraphrased): fork overhead & non-portable
Maybe you want to carefully (this time) read
And it might not. You asked a question. Why would you do that? I gave
you an answer. Because it's more portable and efficient.
Regarding the former: if the program is not available there is no way the
external program does its work perfectly of course.
Now regarding efficiency: that's also not an easy thing to answer for many
reasons. As far as I know (but I am quite out of it to be honest) the
overhead of forking has been reduced a lot over the years, also because
forking is very common. Moreover, on Windows (again as far as I know, I
might be very wrong here) forking is emulated by threading with (again
that disclaimer) way less overhead compared to a classic *nix fork.
However: if efficiency is that big an issue probably you shouldn't have
opted for Perl in the first place.
Does that mean
there are no situations where the overhead and portability are not
important?
Of course there are, but I excluded your portability argument by asking
"why ... its work perfectly" which (work) a non-available program can't
do.
As for the overhead, you might be right in some circumstances, but in that
case I agree with Abigail: you shouldn't have picked Perl in the first
place.
No. There are exceptions to every rule. So what! Why would
people do it? Sometimes (not every time) they are concerned about being
portable or being efficient. The real question is why is this so
difficult for you to understand!
Again, if the overhead of fork forces you to copy a well working program
in Perl you're very likely on the wrong track to begin with. Hourly rates
of skilled Perl programmers exceed the price of a faster computer in a
short time. Using an external program in a way outsources part of the
solution you're working on. And in many cases the external program has
been more widely tested then you can manage on your own.
And if the bottleneck is that serious that the faster hardware is so
expensive that its ok for you to copy an external program into Perl then I
am very sure Perl was a bad choice.
Oh. I see. So you read into my posts whatever you want using words,
phrases and ideas that I just didn't say just because "that's how I read
your posts". There's a word for that. It's called strawman!
Only if I severely misrepresent your argument. After carefully rereading
your attacks (since that's how I read them, which again is not a strawman)
I am even more convinced that I am right.
Actually they called themselves lazy and tried to say it's OK because
Larry Wall says so.
There is nothing wrong with being lazy. It stops one very often from doing
stupid things :-D.
When I have to constantly re-write other people's code because they
consciously made it non-portable and inefficient you betcha I'm
thinking, lazy, incompetent programmers... I really don't think I'm
alone in this.
Sure, every programmer calls the work of many others utter crap. And very
often they are right. But there are also programmers who think that
because they have seen it used wrong in many cases that there is a need to
educate other programmers even when those other programmers clearly have a
very good argument why they are using it in the first place.
I am not a big fan of "foo considered harmful" when it's written like it's
against the law. To me programming is about flexibily and freedom of
expressing oneself. Creativity and such. IMNSHO you tried to make a too
strong case against calling external programs missing a bit what I
originally wrote.