Xref: utzoo comp.lang.modula2:753 comp.lang.misc:1413 comp.lang.c:9064 comp.lang.pascal:783 Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ll-xn!oberon!sdcrdcf!ucla-cs!rutgers!mtunx!lzaz!bds From: bds@lzaz.ATT.COM (BRUCE SZABLAK) Newsgroups: comp.lang.modula2,comp.lang.misc,comp.lang.c,comp.lang.pascal Subject: Re: Modula2's godawful IO. Message-ID: <96@lzaz.ATT.COM> Date: 7 Apr 88 21:31:00 GMT References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> Organization: AT&T ISL Middletown NJ USA Lines: 11 Summary: C++ even better In article <535@m10ux.UUCP>, rgr@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.