daokoder / dao

Dao Programming Language
http://daoscript.org
Other
199 stars 19 forks source link

io::write an io::writeln inconsistency #432

Open Night-walker opened 9 years ago

Night-walker commented 9 years ago

io.write() doesn't add implicit spaces between arguments. io.writeln() does, but its name implies no difference other then appending trailing newline.

I think it's better to not add automatic spacing, at least not with generic io.write* routines which aren't only useful to print console messages. For pretty-printing, other functions may be introduced, e.g. io.put or io.print.

dumblob commented 9 years ago

io.put would resemble byte-wise output as well, so I'd prefer io.print or similar.