Re: why use -> (not .) with pointers?
- From: Alan Balmer <albalmer@xxxxxxx>
- Date: Thu, 30 Jun 2005 11:49:05 -0700
On 30 Jun 2005 16:36:32 GMT, richard@xxxxxxxxxxxxxxx (Richard Tobin)
wrote:
>In article <42c41b0e$0$309$7a628cd7@xxxxxxxxxxxxxxxxxxxxx>,
>Guillaume <"grsNOSPAM at NOTTHATmail dot com"> wrote:
>
>>To me, it's still essential syntactically speaking.
>>
>>Letting the compiler "guess" what you mean is a really, really bad idea
>>in general. Even when the case seems obvious to you.
>
>So would you favour having different operators for integer and
>floating-point addition?
Actually, in light of a problem I tracked down yesterday, that might
not be a bad idea :-)
The end result was truncating fractional hours on a time report. Of
course, that wasn't all - the programmer had cast the result to a
float, then done an sprintf with %f. It got a segmentation violation
only sometimes.
> Is it a disaster that if foo is a function
>pointer you can say foo(1) instead of (*foo)(1)?
>
>Why is determining the action "guessing" in this case but not the
>others?
>
>-- Richard
--
Al Balmer
Balmer Consulting
removebalmerconsultingthis@xxxxxxx
.
- References:
- why use -> (not .) with pointers?
- From: Felix Kater
- Re: why use -> (not .) with pointers?
- From: lawrence . jones
- Re: why use -> (not .) with pointers?
- From: Guillaume
- Re: why use -> (not .) with pointers?
- From: Richard Tobin
- why use -> (not .) with pointers?
- Prev by Date: Re: How to make binary data portable?
- 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
|