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
Re: reduce metaoperator on an empty list
by =22TSa_=28Thomas_Sandla=DF=29=22 other posts by this author
Jun 8 2005 2:41AM messages near this date
Re: return() in pointy blocks | Re: reduce metaoperator on an empty list
Damian Conway wrote:
>  So, to clarify again, if $var is undefined, then the assignment:
>  
>      $var op= $value;
>  
>  is equivalent to:
>  
>      $var = (&op.does(identval) ?? &op.identval() :: undef) op $value;
>  
>  Correct?

Might I add that it should read

       $var = (&op.does(identval) ??
               &op.identval($value) :: undef) op $value;

The rational is, that &op is subject to MMD, so the .identval method
should be dispatched as well. Actually &op.identity($value) reads
quite natural and self documenting if the parameter is required.

Hmm, the MMD form identity( &op, $value ) looks even better. This
folds the identity value selection problem back into type-space
and it's runtime agent MMD.
-- 
TSa (Thomas Sandlaß)
Thread:
=22TSa_=28Thomas_Sandla=DF=29=22
Larry Wall
=22TSa_=28Thomas_Sandla=DF=29=22
Damian Conway
"TSa (Thomas Sandlaß)"

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