Re: why use -> (not .) with pointers?
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Thu, 30 Jun 2005 17:56:20 +0000 (UTC)
In article <42c428a3$0$304$7a628cd7@xxxxxxxxxxxxxxxxxxxxx>,
Guillaume <"grsNOSPAM at NOTTHATmail dot com"> wrote:
>When I see so many programmers mixing integers and fp numbers in
>expressions without quite knowing what they are doing (and sometimes
>wondering why the heck they don't get the results they are expecting),
>I'm thinking: why not different operators. At least, that would force
>you to have a clear understanding of both what you want and what is
>going to happen, without having to read dozens of pages of the standard
>and praying that your compiler sticks to it...
An alternative would be to not do silent type conversion in expressions --
except perhaps (for convenience) for some forms involving constants.
If there is no operator for int + float then the programmer would
have to put in explicit type casts as necessary, thus forcing the
programmer to pay attention at each substep to the types.
Such a scheme might do interesting things to expressions such as
toupper(HexChar) - 'A' + 10
due to the signed-ness ambiguity of char...
--
Warning: potentially contains traces of nuts.
.
- Follow-Ups:
- Re: why use -> (not .) with pointers?
- From: Clark S . Cox III
- Re: why use -> (not .) with pointers?
- From: Eric Sosman
- Re: why use -> (not .) with pointers?
- References:
- why use -> (not .) with pointers?
- From: Felix Kater
- Re: why use -> (not .) with pointers?
- From: Guillaume
- Re: why use -> (not .) with pointers?
- From: Richard Tobin
- Re: why use -> (not .) with pointers?
- From: Guillaume
- why use -> (not .) with pointers?
- Prev by Date: Re: why use -> (not .) with pointers?
- Next by Date: Re: why use -> (not .) with pointers?
- Previous by thread: Re: why use -> (not .) with pointers?
- Next by thread: Re: why use -> (not .) with pointers?
- Index(es):
Relevant Pages
|