Re: Customizable default hash and array values.
by RaFaL Pocztarski other posts by this author
Oct 8 2001 5:28PM messages near this date
Customizable default hash and array values.
|
Re: Customizable default hash and array values.
Bart Lateur wrote:
> On Sat, 6 Oct 2001 19:48:13 -0400, Michael G Schwern wrote:
>
> >> What about zero.
> >
> >No problem in Perl 6.
> >
> > my $foo = %hash{foo} // 'some default';
>
> And nobody will ever confuse this operator with the "comment till end of
> line" marker in C++, Java and Javascript, and many more I suppose.
I'm always confusing BLOCKs with Pascal style comments... And that could
be very confusing with larger code. ;)
- RaFaL Pocztarski, admin@[...].pl
Thread:
Michael G Schwern
RaFaL Pocztarski
Johan Vromans
Bart Lateur
Michael G Schwern
Bart Lateur
Michael G Schwern
Dan Sugalski
David Grove
|