[erlang-questions] input too fast

Bengt Kleberg bengt.kleberg@REDACTED
Tue Jul 3 09:28:02 CEST 2007


On 2007-07-02 21:13, Fredrik Svahn wrote:
...deleted
> While I agree that "<stdin>" seems to be a perfectly valid (although not 
> recommended) filename in all(?) unix systems I do not think that using 
> an atom will help. file:open/2 can already take an atom as filename 
> argument according to the docs. Thus the following commands are all 

backwards compatibility sure makes for a lot of inconsistencies, does it 
not? atoms for file names, what will they think of next?

so, next suggestion (this is not to say that -user is a bad idea, just 
that _i_ would prefer something else):

a new function in the file module: dup/1. used like this:

{ok,Stdin} = file:dup( stdin ),
{ok,Stdout} = file:dup( stdout ),
{ok,Stderr} = file:dup( stderr ),

better? worse?


bengt
-- 
Those were the days...
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."



More information about the erlang-questions mailing list