develooper Front page | perl.perl6.language | Postings from May 2005

$:attr vs $.:attr

Thread Previous | Thread Next
Aaron Sherman
May 15, 2005 10:10
$:attr vs $.:attr
Message ID:
On Sun, 2005-05-15 at 18:34 +0200, Juerd wrote:

> I've been looking for a good moment to come with this, but there is
> none, making this as good a point as any: I don't like the dot in
> attributes, and the colon that replaces it.
> If we have .method and .:method, then we should have $.attr and $.:attr.

Let's have a look, side-by-side:

Old way:

	Declaration	Explicit	Implicit $_	Implicit $?SELF

	has $.var	$obj.var	.var		./var
	has $:var	$obj.:var	.:var		./:var

Your proposal:

	has $.var	$obj.var	.var		./var
	has $.:var	$obj.:var	.:var		./:var

Scanning over those two sets visually, I just don't see that extra "."
as a very big win.... Perhaps if I try in some code:

	$.:var = 1;


	$:var = 1;

Still not seeing it....

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About