Re: why use -> (not .) with pointers?



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? 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

.



Relevant Pages

  • Re: best way to suppress "unused" warning?
    ... Obfuscating your code to pacify your compiler or lint smacks to me of ... letting the tail wag the dog. ...
    (comp.lang.c)
  • Re: Calling VB.net from C++
    ... I tried letting the compiler do it ... do com calls to it through a legacy system com call process - This ... I first tried it on the location of the compiled dll and then put the ...
    (microsoft.public.vc.language)
  • Re: Self pointer in limited record
    ... end; (Marius) ... Yes, now the compiler is accepting this (and letting me copy objects, ... and, yes, getting rubbish in Self). ...
    (comp.lang.ada)
  • Re: Standard integer types vs types
    ... It also might be unnecessarily slow. ... You are letting the compiler ... vendor make decisions for you. ...
    (comp.lang.c)
  • [PATCH]micro optimization of kcalloc
    ... this optimises away a division in kcalloc by letting the compiler ... It is redone to allow size==0. ...
    (Linux-Kernel)