On Thursday, 27 February 2014 at 00:07:47 UTC, H. S. Teoh wrote:
On Wed, Feb 26, 2014 at 11:59:07PM +0000, bearophile wrote:
H. S. Teoh:
>I'm writing a CLI program that uses File.ByLine to read input
>commands,
Isn't using readln() better for that? File.byLine is to read
lines
of files on disk.
[...]
Perhaps, but readln() isn't a range. The whole point was to use
a
range-based API for the interpreter so that there's no need to
write two
separate interfaces for the interpreter, one for stdin, one for
a script
file stored on disk.
T
Just write a function that accepts a std.stdio.File parameter?