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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,43d910f082521047 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.66.86.72 with SMTP id n8mr1751355paz.24.1344322950988; Tue, 07 Aug 2012 00:02:30 -0700 (PDT) Path: g9ni1929pbo.0!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: questions on Ada openGL binding in the GLOBE3D packages Date: Thu, 2 Aug 2012 12:13:09 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Date: Thu, 2 Aug 2012 12:13:09 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="0e44dd4a3c4e0a6e83a86f947fb780ae"; logging-data="16588"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19e4Bgzmo2usfrgVnV3kXhQk9ExWzGenzA=" User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Cancel-Lock: sha1:Az9Dcas1Lngn89/E53ctCWwGMAg= X-Received-Bytes: 3037 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-08-02T12:13:09+00:00 List-Id: On Thu, 02 Aug 2012 04:14:15 -0500, Nasser M. Abbasi wrote: > On 8/2/2012 3:50 AM, Egil Høvik wrote: >> From the OpenGL spec: >> "The declarations shown in this document apply to ANSI C. >>Languages such as C++ and Ada that allow passing of argument type >>information admit simpler declarations and fewer entry points." >> >> >> So no, the names in an Ada-binding does not have to exactly match the C >> version. > > I know they do NOT HAVE TO be the same as C. That is my point. > > They do NOT have to, yes, but it is _better_ if they DO. Why not keep > the names the same? "Making code look the same as C" is ... not unambiguously better! > It will make it easier to program this in Ada if the binding is the > same. No, but I'd agree it will make learning by following C examples a little bit easier. Which is important, up to a point. Actually programming, and reading and maintaining such a program, is likely to be that much harder, as the names are longer,uglier and therefore less readable. I confess I didn't watch this year's Tour de France. But I wonder, how many of the competitors used training wheels? Just a point of view... There is a long tradition among C programmers, of uglifying names as a poor substitute for properly indicating their type. But there is less than no reason to follow that tradition in Ada, where types and packages can be used to properly distinguish different entities. So I would agree with Niklas' suggestion : if you must mimic the look of the C programs, substitute '.' for '_' and use qualified names. Ditto where there is any real danger of confusing a gl.Vertex2d with any other type of Vertex2d. But otherwise, the cleanest and simplest style will be best in the long run. - Brian