Operator overloading -- lets collect some use cases

bearophile bearophileHUGS at lycos.com
Wed Dec 31 10:16:30 PST 2008


Andrei Alexandrescu:
> The name and original implementation of writefln are Walter's and 
> predate my tenure with D. I just defined write() and writeln().

write/writeln are very useful to avoid the silly bugs caused by the possible of a % inside the first string given to writefln. But write/writeln have still a quite large amount of holes/limits (*) that deserve (or must, I'd say) to be filled/fixed. I have named put/putr (final "r" stands for return) my pair of fixed ones (fixed, but not perfect, they have few bug still), a shorter name to type, and you can't write writenl by mistake as I've done for a couple months.

(*) If you want I can list few pages of such problems/limits/bugs. I have not done this already because not a single person here has shown some interest in fixing the writef/writefln/write/writeln functions so far.

Bye,
bearophile



More information about the Digitalmars-d mailing list