[erlang-questions] what's happened in the shootout

Claes Wikström klacke@REDACTED
Mon Jun 18 20:27:24 CEST 2007

Ulf Wiger (TN/EAB) wrote:

> Couldn't we introduce a BIF, erlang:put_chars(IoList),
> (or possibly put_chars(stdout | stderr, IoList))
> which simply writes the given bytes to stdout?

We already have such an efficent BIF:


outp() ->
     P = open_port({fd, 1, 1}, [out]).

test() ->
     P = outp(),
     port_command(P, "Hi there \r\n"),
     port_command(P, <<"Hi there again\r\n">>),
     port_command(P, ["And ", <<"hello">>, "again", "\r\n"]).


More information about the erlang-questions mailing list