On Wed, Nov 20, 2002 at 10:16:54PM -0800, Dave Storrs wrote:
:         #   Could you really tell what this does at a glance?
:       my $s = ~hex:w4p2d0rs $i;   
: 
:       my $s = ~hex $i but width 4 
:                         but precision 2 
:                         but padded 0
:                         but rightjustified
:                         but usesign;
: 
: The second one is definitely longer...and substantially longer than
: the equivalent sprintf.  But I also don't need to dig out my K&R to
: remember how to write it.
: 
: As a tangent...one of the things that has bothered me about "but" and
: "is" for properties since the beginning is that they make for
: excessively long code.  Does this bother anyone else?

It's *supposed* to bother you.  It's a sign that you're abusing the
property system.  Properties are not a replacement for object attributes,
and they're not a replacement for function arguments.  Just try sending
a memo to your boss with five Post-It notes on it, and see how it well
it works out...

Larry

Reply via email to