Article View: comp.std.c++
Article #2156Re: comp.std.c++ frequently asked questions
From: Matt Austern
Date: Tue, 10 Oct 1995 15:02
Date: Tue, 10 Oct 1995 15:02
29 lines
2419 bytes
2419 bytes
In article <451nu2$ocp@news.jf.intel.com> Cindy Ward <\"Cynthia_Ward_at_jfccm14\"@ccm.jf.intel.com> writes:
> I was susprised to read in your FAQ that C-style casts are now
> deprecated. To the best of my memory (and I freely admit that I haven't
> attended an X3J16/WG21 meeting since July 1994 in Kitchner), the decision
> was to add new-style casts *without* deprecating C-style casts (because
> the strawman motion to deprecate C-style casts was resoundingly voted
> down). I also scanned through Appendix C ("Compatibility") of the April
> WP and didn't see a mention of deprecation of C-style casts there.
Sorry, I really shouldn't have used the word "deprecated": as Cindy
points out, it has a very specific meaning. (A feature that is
deprecated, for example, is likely to be removed from the language
in a future revision---in principle, at any rate.) And, indeed,
C-style casts haven't been deprecated.
I really just meant that there is no longer any reason to use C-style
casts in C++: anything that you could use C-style casts for, you can
also do with static_cast, dynamic_cast, const_cast, and
reinterpret_cast. New style casts are a clearer and safer
replacement.
--
Matt Austern He showed his lower teeth. "We
matt@physics.berkeley.edu all have flaws," he said, "and
http://dogbert.lbl.gov/~matt mine is being wicked."
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<MATT.95Oct8232135@godzilla.EECS.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamageReferences:
<199510012343.QAA04823@cyclops5.berkeley.edu> <451nu2$ocp@news.jf.intel.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage From: matt@godzilla.EECS.Berkeley.EDU (Matt Austern) Newsgroups: comp.std.c++ Subject: Re: comp.std.c++ frequently asked questions Date: 10 Oct 1995 15:02:13 GMT Organization: University of California at Berkeley (computational neuroscience) Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <MATT.95Oct8232135@godzilla.EECS.Berkeley.EDU> References: <199510012343.QAA04823@cyclops5.berkeley.edu> <451nu2$ocp@news.jf.intel.com> Reply-To: matt@physics.berkeley.edu NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: godzilla.eecs.berkeley.edu In-Reply-To: Cindy Ward's message of 6 Oct 1995 00:26:41 GMT Content-Length: 1412 X-Lines: 25 Originator: clamage@taumet