At 07:54 PM 8/9/00 -0600, Nathan Torkington wrote: >Damian Conway writes: > > With extra contexts I can be surer: > > > > my $yesterday = date() - 86400; # reasonable to expect epoch integer > > my $today = "today is " . date(); # reasonable to expect date string > > my $tomorrow = date()->{DoY} + 1; # reasonable to expect hash ref > >(please hold, thinking out loud) > >What is: > > $x = date(); > >going to return? It'll make $x a scalar with a completely overloaded set of vtable functions. >How then does this work? > > somesub( date() ); Date's taken in a list context, as is the default for subs, so it'd spit out a list. Possibly it could make an iterator and defer evaluation, but that'd depend on some of Damian's stuff getting in. (Which would be rather nifty) Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk
- Re: RFC 73 (v1) All Perl core functions should return ob Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions should retu... Nathan Torkington
- Re: RFC 73 (v1) All Perl core functions should ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core functions should ... David L. Nicol
- Re: RFC 73 (v1) All Perl core functions should ... Steve Simmons
- Re: RFC 73 (v1) All Perl core functions should ... Dan Sugalski
- overloading assignment operators David L. Nicol
- Re: overloading assignment operators Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions should retu... Damian Conway
- Re: RFC 73 (v1) All Perl core functions should ... Nathan Torkington
- Re: RFC 73 (v1) All Perl core functions should ... Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions should ... Damian Conway
- Re: RFC 73 (v1) All Perl core functions should ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core functions should ... Damian Conway
- Re: RFC 73 (v1) All Perl core functions should ... Bart Lateur
- Re: RFC 73 (v1) All Perl core functions should ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core functions should ... Damian Conway
- Re: RFC 73 (v1) All Perl core functions should ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core functions should ... Damian Conway
- Re: RFC 73 (v1) All Perl core functions should ... David L. Nicol
- Re: RFC 73 (v1) All Perl core functions should ... Damian Conway