> Somewhat to my own surprise, I really like this RFC.

Thanks :-)

> My only disagreement is that I think it's a mistake to defer the call
> to TIEWHATEVER until the first access. It ought to be done when
> the typed variable is declared, so that it's easy to determine where
> a variable is tied.

Yeah, that's fine. I was trying to keep inline with RFC 218, because I
thought it would be weird for this:

   my Pet $spot;    # tied
   my Dog $x;       # not
   print "ok" unless (defined $spot or defined $x);

to return true and not print "ok". But I guess you can easily check with
tied() too, and it makes more sense to just tie it on declaration (my
original inclination).
 
> There is also the issue of how one passes multiple
> arguments to set up the tied variable in the first place.
> Something like this perhaps:
> 
>         my Tieable $var : tie(@args) = $init_val;

Excellent!
 
> Also, I didn't see any reference to the fact that RFC 218 will
> have to change to "...just an assertion, unless the package autoties,
> in which case it's no longer an assertion".

Yes, I believe Piers brought something like that up too, I'll go answer
his thread as well...

-Nate

Reply via email to