explicit casts
How sound is the following advice for a C language coding standard?
"Explicitly cast or convert variables. Do not rely on the implicit
conversions."
I have my opinions, but I would like to hear yours.
Thanks,
rCs
.
Relevant Pages
- Re: explicit casts
... "Explicitly cast or convert variables. ... Do not rely on the implicit ... "I'm not here to convince idiots not to be stupid. ... (comp.lang.c) - Re: [OT] Rounding v Truncation, was: Re: Platform Support vs.
... that is why I said IMPLICIT conversion. ... but about implicit floating to int conversions. ... ever encountered truncates on implicit float to ints. ... > Why do other languages need truncation or rounding rules? ... (comp.os.vms) - Re: Operator Overload question for VB 2005
... Just be aware that a "widening ctype" operator may cause implicit ... conversions when you do least expect them! ... The DateTime operator - returns a TimeSpan, ... (microsoft.public.dotnet.general) - Re: Implicit conversion design issues
... Conversions and overloading are the most confusing parts ... atleast from a compiler writer's point of view. ... I know you cannot have both implicit and explicit ... (microsoft.public.dotnet.languages.csharp) - Re: More static type fun.
... probably even easier than what most statically typed languages provide ... mixed arithmetics). ... most people don't want such implicit ... conversions between arithmetic types, because they know that such implicit ... (comp.lang.lisp) |
|