Hi Uri,

On Monday 18 Apr 2011 08:50:43 Uri Guttman wrote:
> >>>>> "SF" == Shlomi Fish <shlo...@iglu.org.il> writes:
>   SF> Hi Uri,
>   SF> thanks for all your input on this list. See below for my response.
> 
>   SF> On Monday 18 Apr 2011 07:56:16 Uri Guttman wrote:
>   >> >>>>> "mr" == marcos rebelo <ole...@gmail.com> writes:
>   mr> Ugly but may work, with a simple eval
>   mr> use strict;
>   mr> use warnings;
> 
>   mr> my $var = '$str. q( abc_xyz)';
>   mr> my $str;
> 
>   mr> for(my $i=1;$i <= 5; $i++){
>   mr> $str = $i;
>   mr> my $line = 'Line: '.eval $var;
>   mr> print "$line\n";
>   mr> }
> 
>   >> NEVER do that for such a simple problem. eval string is a last resort
>   >> when no other technique can work well.
> 
>   SF> Well, you are right naturally, but there is no need to be so
>   SF> rude. Start your email with a greeting, continue with a
>   SF> compliment, use soft words, etc.  Otherwise, you may be scaring
>   SF> many people away. See some of my advice in:
> 
> it isn't rude. this comes up often enough that it needs to be snipped in
> the bud. eval string is not for newbies or even experienced coders
> unless it is ABSOLUTELTY needed. it has too many dangers to ignore that
> rule.

I agree that it is bad and has to be sniped in the bud. But they way you're 
expressing yourself on E-mails is alienating many people. 

> 
> this is akin to a toddler reaching out to touch the stove. you have to
> stop it before it happens. when some on this list post eval solutions,
> that has to be stopped before some newbie runs with the answer. the code
> that results will be dangerous to an extreme. yelling to prevent a stove
> burn is not only acceptable, but commendable. i won't back off what i
> said.

Well, what are the implications of someone using eval in production code 
(which would be perfectly safe in this example, although sub-ideal) vs. a 
toddler reaching out to touch the stove? You're overstating the consequences.

You could have said that it is not a good thing, while being polite and much 
less hostile and angry. As it is, you are scaring many people from this list.

I was not referring just to tthis particular E-mail of yours, but to your 
general trend of hostile communication. You should try to be more friendly and 
pleasant.

> NEVER USE STRING EVAL unless you absolutely must and you know what you
> are doing. it should NEVER be the first answer to ANYTHING.
> 

You are right about that, but that wasn't my point.

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs

Stray XSLT code causes more deaths than road accidents.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to