ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-language
perl6-language
&?CALLER::BLOCK vs. any hope of efficient compilation
by Chip Salzenberg other posts by this author
Jun 14 2005 7:12AM messages near this date
Re: new mailing list: perl6-general? | Re: &?CALLER::BLOCK vs. any hope of efficient compilation
I'd like a ruling that &?CALLER::BLOCK is not a general-purpose
block promoter, but only works if the calling block already marked
itself as callable, perhaps by mentioning &?BLOCK in its body.

First, I like the idea that all blocks act as if they were subs WRT
being callable and accepting parameters.  However, the "as if" part of
that statement is very important to a compiler.

AFAICT, to achieve reasonable performance, a compiler must be able to
assume that in the absence of markers or predeclaration, a given block
need not be given all the accoutrements and instrumentation of a full
subroutine, because nobody is going to call it _as_ a subroutine.

It therefore would a Bad Thing if &?CALLER::BLOCK worked generally.
If the caller _is_ a block that was already marked at compile time as
requiring full sub properties then, of course, it's no problem to use
the syntax &?CALLER::BLOCK to denote it.
-- 
Chip Salzenberg <chip@[...].com> 
Thread:
Chip Salzenberg
Larry Wall

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved