Damian Conway wrote:
>
> > What is:
> >
> > $x = date();
> >
> > going to return?
>
> Probably the current scalar context result (i.e. a date string)
>
> > An object that has many different -ify methods:
> > stringify
> > numify
> > hashify
> > listify
> > objectify (!)
>
> Possible, but blech.
Why is that more blech? if the function has to return
something different depending on wantgenericscalar, wantarray,
wantinteger or wantfloat being set, it might be just as easy
to return a closure that will defer making up its mind about
this as long as possible.
if date() returns an object of type date, which is just like
a big integer except it stringifies into localtime(this) instead
of sprintf("%i",this) where's the blech in that?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Who moved mmy blech?
- Re: RFC 73 (v1) All Perl core ... Nathan Torkington
- Re: RFC 73 (v1) All Perl core ... Dan Sugalski
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Bart Lateur
- Re: RFC 73 (v1) All Perl core ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... David L. Nicol
- Re: RFC 73 (v1) All Perl core ... Damian Conway
- Re: RFC 73 (v1) All Perl core ... Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions sho... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core functions should return ob Hildo Biersma
