Al-

> In some of the OO stuff people (me included) wanted to see simple scalars be
> able to act "like" objects. 

You'll be particularly interested in RFC's 159 and 161, and discussions
on -objects. Check out these emails in particular:

http://www.mail-archive.com/perl6-language-objects%40perl.org/msg00097.html
http://www.mail-archive.com/perl6-language-objects%40perl.org/msg00106.html
http://www.mail-archive.com/perl6-language-objects%40perl.org/msg00112.html
http://www.mail-archive.com/perl6-language-objects%40perl.org/msg00138.html

-Nate

"Lipscomb, Al" wrote:
> 
> >>I'd like to see every number bundled with a "precision" attribute.
> 
> >That's not what I call a high-level language feature.  People don't
> >want to think about that, nor about machine-level precision issues.
> >See REXX.
> 
> >In fact, I'd rather to see a painless and transparent int->float->bignum
> >autoconversion happen, the way currently we (theoretically) see the
> >int->float one occur.
> 
> In some of the OO stuff people (me included) wanted to see simple scalars be
> able to act "like" objects. Others have talked about allowing for strong
> typing. I was wondering about maybe being able to store these attributes as
> optional parts of the scalar. Something like this (please don't get hung up
> on the details, I am not much of a designer):
> 
>    my($amt,$hours,$total);
>    $amt->{TYPE} = "DOLLARS";
>    $total->{TYPE} = "DOLLARS";
>    $hours->{TYPE} = "INTEGER";
>    $total->{PICTURE} = "$zzz,zz0.00"; # seen any COBOL in Perl, can't
> remember the Perl equiv?
>    #
>    $total = $amt * $hours;
>    # for strict type checking
>    $total->{ASREAL} = $amt->{ASREAL} * $hours->{ASREAL};
> 
> does the concept make any sense (God help the example)? The idea being that
> when strong type checking is turned on the first multiplication example
> would flag a warning.

Reply via email to