Melvin Smith wrote:
> At 10:30 PM 4/8/2002 -0700, Robert Spier wrote:
>>> Keep track of global (or interpreter local) scope with a macro
>>> upon entry.
>> I shudder every time someone says "macro" on p6i.
>> perl5 has several thousand macros defined.  (grep for ^#define) (over 
> Are you counting literals and things like bit values in your grep?

Yes, although the later numbers did filter several thousand out.

>> This makes it wonderfully challenging to debug.
> That might be a bit unfair, I'd argue that it makes it _easier_
> to debug in many cases, particularly with constants.

I'll agree with the statement about constants.

> 'macro' here is a choice of words... call it an inline function if you 
> want.

Well, calling them inline functions is problematic too.

If you have a line of code that looks like:

        SvPVX( HvKEY( SvPV( foo ) ) );
                # made up, but it *could* be from the perl5 source

where one of those "inline functions" actually refers to three others, 
and one is four lines long.. and suddenly you end up tracing through 
data structure dereferences six layers deep... it's less than amusing. 
(But can be quite fun.)

> I'd be more worried about debugging that computed goto core than a 
> macro. :)

*shudder*

-R


Reply via email to