Modula2's godawful IO.
BRUCE SZABLAK
bds at lzaz.ATT.COM
Fri Apr 8 07:31:00 AEST 1988
In article <535 at m10ux.UUCP>, rgr at m10ux.UUCP (Duke Robillard) writes:
> I hate C as much as the next guy, but it seems to me that printf is
> the solution.
I like C++'s overloading of the << and >> operator's even better than
printf. It allows you to define custom print routines for each structure
(class) declared, and then to print (to stdout for example) you do:
cout << god_awful_structure_instance;
The advantage of this approach over using procedures in
modula2 or pascal is (besides previty) that you don't have to
remember the type of structure your variable is; the compiler figures it out.
More information about the Comp.lang.c
mailing list