From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1ff5003422436e4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-17 03:31:05 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!aadt!ventures!a311581 From: a311581@ventures.NoSubdomain.NoDomain (Kevin Cline) Subject: Re: Easily-Read C++? Message-ID: Sender: a311581@ventures (Kevin Cline) Organization: American Airlines Decision Technologies References: <3719k1$11gt@watnews1.watson.ibm.com> <85C92963672@annwfn.com> Date: Fri, 14 Oct 1994 21:13:06 GMT Date: 1994-10-14T21:13:06+00:00 List-Id: In article , emery@goldfinger.mitre.org (David Emery) writes: |> The ambiguity 'inherent' in declarations such as |> char * foo; |> char ** foo; |> char foo[]; |> char *foo[]; |> causes problems for C tools. Even though each of the above is |> 'unambiguous', common usage means that any of these can be used to |> represent the others. At least one tool I know of (an RPC generator |> for C) requires the user to disambiguate some of the above |> declarations, to make sure that the tool generates the right code. |> These declarations are not equivalent. The first is equivalent to the third, and the second to the fourth. The equivalence of C pointers and arrays is unfortunate. It is maintained by C++ for backward compatibility reasons. Most C++ applications use a library template array class instead of C arrays. Kevin Cline