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



In article <20050630150438.69d675d3.f.kater2@xxxxxxx>,
Felix Kater <f.kater2@xxxxxxx> wrote:
>
>when accessing the variables in a struct: What's the reason why in C
>you have -> and . instead of only . ?

I think it's at least partially historical. Most other languages of
the time (mid seventies) were making the distinction between pointing
and membership, perhaps less for utilitarian reasons and more because
there was a perception (at the time) that pointers were a difficult
concept for computer science students to grasp. Having a distinct
syntax (one which actually has a "pointy" symbol) may have been helpful
in that area.
--
7842++
.



Relevant Pages

  • Re: Thoughts about the new standard
    ... There is no reason any longer for the distinction. ... and pointers were not as clean as they are now. ... unnecessary to specify whether an object is a struct, ...
    (comp.std.c)
  • I was arousing to reproduce you some of my chief audiences.
    ... When did Lisette receive the distinction ... golden Woodrow until his reason provides gracefully. ... Don't even try to regret the depressions nearby, ... If you will seek Founasse's parish in addition attendances, ...
    (sci.crypt)
  • Re: Case-insensitivity considered harmful
    ... are lots where it is very hard to distinguish many lower-case letters. ... fonts use a non-traditional '0' for that reason, ... In computer languages, ... common convention was commentary in mixed case and code in upper. ...
    (comp.arch)
  • Re: C# or VB.NET?
    ... i am a part-time/casual developer. ... VBScript, and now when I'm migrating to .NET, I obviously chose VB.NET. ... The reason, of course, is the .NET Framework... ... The reason that both languages are identical is because they both target the .NET Framework. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: exponentiation operator (lack of)
    ... > of exponentiation operator. ... Those 3 languages were widely used in their heyday although ... of course were not useful for low-level system programming. ... One reason: the ability of C to interact closely with the hardware ...
    (comp.lang.c)