[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Objection to forced 'object' usage.
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 16 Feb 2003 03:23:37 -0200
Peter Prade:
> well i guess you can always do an:
> io.fread = stdin.read
>
> to enable:
> io.fread(filehandle,format1, ...)
>
> if you dislike:
> filehandle:read(format1, ...)
Peter Hill:
>Huh? I don't follow this.
I guess the stdin stuff mislead you: stdin is just a handy filehandle
that's always available. But once you have any filehandle, you can
do io.fread = filehandle.read and get your function as above. That
filehandle.read is the function you want should be clear from the
definition of ":" as syntax sugar.
--lhf