Re: RFC 161 (v2) OO Integration/Migration Path
[email protected] (Nathan Wiger)
| Newsgroups | perl.perl6.language.objects |
|---|---|
| Message-ID | <[email protected]> |
> > Arg! You beat me to it. :-) This was the next RFC on my list. > > Nate, if I had known that, I would gladly have let you take the arrows. =^) :-) > To clarify: Methods such as 'asInt()' could be ignored at will. If they were > never called, Perl would still Do The Right Thing. So, totally optional, and > (more importantly) invisible. Great. My point I was trying to drive at was that: my int $x = 5; Could turn around and do something different than asInt(). All stores are done throught STORE(), and context checking is done on access. So I was picking at details. > Also, Scalars could also have a 'toString()' method (or similar), borrowing > from Java. Yeah, check out RFC 49, "Objects should have builtin stringifying STRING method", and RFC 159, "True Polymorphic Objects", at http://dev.perl.org/rfc/. They propose a whole set of data and operator functions that I think integrate with the "make everything an object" idea really well. Indeed, this was the intent from the get-go. STRING() and NUMBER() are among just a few proposed. > > commit $firstname # or rollback $firstname > > > > Take your pick. > > Surprisingly, I hadn't considered continuing on with the indirect syntax > like that, but it makes total sense. Very cool. Right on. :-) At the very least we know there's two crazy people on this list! -Nate