From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,HEADER_SPAM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc772,b30bd69fa8f63cb2 X-Google-Attributes: gidfc772,public X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-04 11:00:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uwm.edu!rpi!not-for-mail From: "Ken Hagan" Newsgroups: comp.lang.ada,comp.lang.c++.moderated Subject: Re: C bug of the day Date: 4 Jun 2003 14:02:59 -0400 Organization: unknown Sender: cppmods@netlab.cs.rpi.edu Message-ID: References: <3EDCCE72.4020707@cogeco.ca> NNTP-Posting-Host: netlab.cs.rpi.edu X-Original-Date: Wed, 4 Jun 2003 10:30:55 +0100 X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated iQBVAwUAPt40UEHMCo9UcraBAQHjWgH+NxtZa9FpzAwxLRHRD7/kpOJ/zULCSftq wbODuM7yW8Rv1Q41LQU/lxY8CZUXQwj6aJCyBguxXfNz6Z0cfvIJyQ== =gbR7 Xref: archiver1.google.com comp.lang.ada:38631 comp.lang.c++.moderated:67741 Date: 2003-06-04T14:02:59-04:00 List-Id: Warren W. Gay VE3WWG wrote: > > But your experience only goes to show as I have > always maintained, that C++ is not safe because of the STL. > There will always be the temptation to go straight to > the old C habits (I know, you can go out of your way to do > bad things in Ada too, but in Ada at least, this is usually > more effort.. not less). Whether that is tempting depends on your library and your personal outlook. printf ought to be slower than IO streams, particularly if the latter aren't sync-ed with stdio, so I don't see much temptation there. I think the real issue here is that C++ programmers tend to be fairly tolerant of the C legacy and consider functions like vsprintf to be really flexible building blocks rather than the spawn of the devil. Ada programmers are probably using Ada precisely because they disagree with that viewpoint. I'd guess that an Ada programmer forced to write in C++ would always use IO streams rather than the C library. (This thread is cross-posted, so presumably I'm about to find out. :) [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ] [ about comp.lang.c++.moderated. First time posters: do this! ]