On 10/29/01 4:38 PM, Larry Wall wrote: > : > I'm quite curious to see what the initialization syntax will be like. > : > : class Demo { > : my $foo; > : my $bar; > : > : method INIT ( $fooval, $barval) { > : $foo = $fooval; > : $bar = $barval; > : } > : > : method foo is lvalue { > : return $foo; > : } > : } > > Ick. I don't want to lose the dots that visually distinguish instance > variables from ordinary lexicals, and simultaneously render the extra > bracketing and indentation unnecessary.
Yeah, that Java-like nesting must have slipped by me earlier. (Maybe I just read it as Java? ;) I definitely like this better: > class Demo; > > my $.foo is public; > my $.bar; > > method INIT ($fooval, $barval) > { > $.foo = $fooval; > $.bar = $barval; > } (sorry, couldn't help fixing the braces... ;) -John