Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: A Macro System for Perl?

by samtregar (Abbot)
on May 04, 2002 at 02:11 UTC ( [id://163956]=note: print w/replies, xml ) Need Help??


in reply to Re: A Macro System for Perl?
in thread A Macro System for Perl?

I think #1 could potentially buy you quite a bit. Subroutine overhead in Perl is quite large - lots of stack operations resulting in lots of memory reads and writes. I also think this is probably the one that might be possible in Perl 5. At the core it seems that it would require nothing worse than some really clever op-tree gymnastics...

I'm not smart enough to understand #2 yet. Someone needs to write the currying section in Learning Perl before I can grok it, perhaps.

What do you mean by #3? Filter?

-sam

Replies are listed 'Best First'.
Re: Re: Re: A Macro System for Perl?
by Elian (Parson) on May 04, 2002 at 02:20 UTC
    Well, subroutine calling should be a lot cheaper in perl 6, so there ought not be much difference between starting a new block and starting a subroutine. (That's the plan, at least. Whether we can pull it off is another question entirely)

    As for #3.... the AST that the parser builds up will be accessible in some fashion, so the sort of macro transformation you have in mind could work on that, basically working on your parsed code as a series of symbols rather than as a series of characters, which'd make the transformation conceptually simpler.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://163956]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found