On Sun, Sep 03, 2000 at 12:42:52PM +0200, Bart Lateur wrote:
> But now you're throwing away the kid with the bathwater.
> 
>       my Dog $spot;
> 
> initially was syntax invented so that $spot was marked as only been ably
> to reference a Dog, with as a result that code internally could be
> optimized, by doing things at compile time why otherwise would need to
> be dealt with at runtime. (use fields, as the most notable example).
> Don't throw that away.

Just to be clear, I'm not throwing it away.  Nothing's preventing the
compiler from still doing that optimization.  I'm simply tacking on
additional meaning, that it creates a Dog object out of $spot.

It's been something of a struggle to word the RFC correctly so that it
properly conveys that the old usage of my Dog $spot won't work as used
currently, but the optimization can still be done.  Does that make any
sense?

 
> Your proposed isa(Dog) syntax is supposed to replace that syntax, while
> the old syntax would get new functionality. It doesn't look nice, for a
> start. The idea breaks the "if it does something else, give it a new
> name" rule. How about:
> 
>       my new Dog $spot;

That's definitely an alternative.  I don't particularly like it, but it's an
alternative.  That is, assuming we all (or at least, most of us) want an
implicit construction mechanism.  From the discussion, that doesn't seem to
be the case.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to