develooper Front page | perl.perl6.language | Postings from July 2001

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

Thread Previous | Thread Next
From:
David L. Nicol
Date:
July 9, 2001 16:01
Subject:
Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)
Message ID:
3B4A3614.1D8E91B@kasey.umkc.edu
Matt Youell wrote:
> 
> >What if you want multiple constructors with redundant code, et cetera --
> >there is flexibility.
> 
> You could get that same flexibility from a mandated new(). If you don't want
> to support new, overload it so that it does nothing. Or maybe that could be
> the default behavior. The major benefit being a code-supported (but not
> enforced) preference that could be relied upon to exist.

So you're saying you would $@ to remain undefined after

	$NewName=join('',map {${[a..z]}[rand 26]} 1..10);
	eval "\$Freshone = new $NewName";

What would $Freshone be?  a blessed reference to undef?


-- 
                                           David Nicol 816.235.1187
        "It's widely known that the 'F' in RTFM is silent." -- Olie


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About