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: proposal: binding with a function
by Abhijit Mahabal other posts by this author
Jun 20 2005 8:39AM messages near this date
Re: proposal: binding with a function | Re: Perl defined Object, Array, Hash classes
On Mon, 20 Jun 2005, B�RTH�ZI Andr�s wrote:

>  Hi,
> 
>  I'm still interested in, why "alias" wouldn't be a native Perl 6 term?
> 
>  I think, there are several reasons for "alias":

I am not arguing against alias, but just wanted to point out something.

>  - in Perl 6, currently there's no way to create a reference to a
>    variable, _with the context of the variable_, too

unless you bind immediately where you declare the original variable:

>  Some new examples, maybe better than before:
> 
>  sub kilobytes ($value:) is export {
>  	return $value*1024;
>  }
>  alias kilobytes, kilobyte;

replace the last line with:
   &kilobytes := &kilobyte;

and the scoping is not an issue.

And with synonyms, binding as soon as declaring seems prudent.

--abhijit

Abhijit Mahabal      http://www.cs.indiana.edu/~amahabal/
Attachments:
unknown1

Thread:
B=C1RTH=C1ZI_Andr=E1s
Larry Wall
Damian Conway
Ingo Blechschmidt
Juerd
Carl Franks
B=C1RTH=C1ZI_Andr=E1s
B=C1RTH=C1ZI_Andr=E1s
BÁRTHÁZI András
Brent 'Dax' Royal-Gordon
BÁRTHÁZI András
Brent 'Dax' Royal-Gordon
BÁRTHÁZI András
Abhijit Mahabal

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