Re: RFC 171 (v1) my Dog $spot should call a constructor implicitly

[email protected] (James Mastros)
Newsgroups perl.perl6.language.objects
Message-ID <[email protected]>
On Wed, Aug 30, 2000 at 03:17:59PM -0400, Michael G Schwern wrote:
> Its not just objects and classes we're talking about, its types and
> variables, too.  Remember, Perl ain't all OO yet.  Which is further
> aggrivated if "my Class $obj" has magical meaning and calls a
> constructor.
> 
> Now, we could define a set of builtin, reserved types which cannot be
> used as classnames and which Perl treats specially.  Instead of
> calling the constructor, they would do some efficiency voodoo behind
> the scenes based on their given type.
> 
> This seems perfectly feasible, I'm just worried about having a double
> meaning and special behaviors for "my Dog $spot" this early in the game.
I don't see why this needs to be... either:
1) We clearly define in the beginning that if "Dog" is a basic type, then
this has semi-magical properties.
2) We clearly define that basic types will always m/^[A-Z]+$/.

This makes it such that we have to say my INT $n, but that's quite
consistant with the rest of perl.  (It also makes it so that all-uppercase
module names without any colons might behave oddly.  This is bad for CGI,
but if it becomes WWW::CGI, then it's all OK...)

	-=- James Mastros
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.