Re: On "type casting"
- From: blargg <blargg.ei3@xxxxxxxxxxxxx>
- Date: Thu, 19 Feb 2009 17:20:53 -0600
Stephen Sprunk wrote:
Han from China wrote:
There are people on this newsgroup who would blanket ban any use
of the term "type casting" in C, no matter what the context,
whether used in reference to an implicit conversion or an explicit
conversion. In other words, your use of "type cast" above to
refer to an explicit conversion is considered wrong by a number
of people on this newsgroup who think type casting is only what
actors do. They believe "cast" is correct but "type cast" isn't.
The Standard explicitly defines "cast" as an explicit conversion, so
that makes it automatically correct per clc dogma.
Depending on your views, "type cast" (or "typecast") is either incorrect
or, at best, redundant.
FWIW, typecasting is something done _to_ actors, not _by_ actors.
For the record, I think "explicit cast" is a redundancy as well,
since "cast" means "explicit conversion", but that's another
matter.
Right; "explicit cast" is again redundant, since casts are always
explicit. I'm more bothered by "implicit cast", but that shows the
symmetry in the misuse of "cast" to mean "conversion".
Yes, agreed in all respects. Being redundant just waters down the
original word. "Explicit cast" implies existence of an "implicit cast",
as "type cast" implies existence of some other kind of cast. Same for
things like cold/warm temperatures, long lengths, large/small sizes,
etc. which I often lose sleep over.
This kind of degradation occurs in other areas too; I was just reading a
C book in which the author used both "int* pointer" and "int pointer" to
refer to int*, which was odd as just pages later he was urging readers
to properly differentiate between "const pointer" (int* const) and
"pointer-to-const" (const int*).
.
- Follow-Ups:
- Re: On "type casting"
- From: Phil Carmody
- Re: On "type casting"
- References:
- Re: On "type casting"
- From: blargg
- Re: On "type casting"
- From: Han from China
- Re: On "type casting"
- From: Stephen Sprunk
- Re: On "type casting"
- Prev by Date: Re: Serious conformance BUG in lcc-win32 still present
- Next by Date: More proof of errors going uncorrected among the "regs"
- Previous by thread: Re: On "type casting"
- Next by thread: Re: On "type casting"
- Index(es):
Relevant Pages
|