On Sat, Nov 02, 2002 at 12:13:19PM -0000, Jeff wrote:
>>>It sounds like you're saying that you should only use a subset of Perl
>>>as some programmers may not understand the other parts of it?

>> That is what I'm saying.  I'm aware that this is a controversial 
>> opinion in the Perl world.  However, I think it's reasonable to 
>> know your audience and write for them.  

> Have to agree 100% with Perrin - in my experience, refactoring for
> performance is often used as an excuse for 'rewrite in my style',

I'm not sure anyone has actually posited using map for performance, but 
in most cases that would indeed be a pretty stupid reason to use it.

> and at this point, future maintainability is usually severly
> compromised. Someone decides to replace all foreach loops with map,
> because this is more advanced and kewl.

Automatically replacing all 'foreach' loops with maps would also be
pretty stupid.  They're different thing, used for different purposes.

But using a foreach when you should be using a map is no better.

When someone misuses something, the wrong approach is to no longer use
it.

The correct approach is to educate people on the correct use.

Tony

Reply via email to