On Wed, Aug 10, 2005 at 09:29:38PM +0200, TSa wrote:
> >Finally, it would get tedious to write them out by hand.  So a lexical
> >"traits" pragma may help:
> >
> >    {
> >     # Entering the realm of referential transparency...
> >     use traits < defined typed constant >;
> >     my $x;  # automagically receives the three traits
> >
> >     {
> >         # Falls back to the dynamic world...
> >         no traits < typed constant >;
> >         my $y;
> >     }
> >    }
> >
> >Does this sound sane?
> 
> To me it sounds more superfluous. What distinguishes
> 'referential transparency' from 'the dynamic world'?

I think that's because you live in the static realm already. :)

    my $x is typed;
    $x = "123";
    $x = length($x);

Would be a type error.  If it's in the dynamic world (as in Perl5),
that's just fine.  Does that difference make sense to you?

Thanks,
/Autrijus/

Attachment: pgpzlwvQHyEWM.pgp
Description: PGP signature

Reply via email to