comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: questions on Ada openGL binding in the GLOBE3D packages
Date: Thu, 02 Aug 2012 13:19:56 +0300
Date: 2012-08-02T13:19:56+03:00	[thread overview]
Message-ID: <a7v2ieFpstU1@mid.individual.net> (raw)
In-Reply-To: <jvdgd7$5e3$1@speranza.aioe.org>

On 12-08-02 12:14 , 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.

Subjective opinion and matter of taste.

FWIW, I prefer the Ada-style names. The changes (at least in the
examples you showed) are so systematic and simple that it is easy to
translate in one's mind, when necessary.

>  Why not keep the names the same?

The C-style names are needlessly long and tedious. The "gl" prefix is
necessary (well, almost) in C, for name-space reasons, but unnecessary
in Ada. If you like, in your Ada code you can include the prefix by
using the GL package name to qualify the names. Adding a period to
change glVertex2d into GL.Vertex2d is hardly difficult.

IMO, it is neater and less trouble to use the same style of identifiers
for my native Ada code and for the bound libraries from other languages.
I think that is one of the desirable features of a binding, even a thin
binding.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .



  reply	other threads:[~2012-08-07  7:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <jvddr3$uqm$1@speranza.aioe.org>
2012-08-02  8:50 ` questions on Ada openGL binding in the GLOBE3D packages Egil Høvik
2012-08-02  9:14   ` Nasser M. Abbasi
2012-08-02 10:19     ` Niklas Holsti [this message]
2012-08-02 10:46       ` Nasser M. Abbasi
2012-08-02 11:12         ` Egil Høvik
2012-08-02 11:56           ` Georg Bauhaus
2012-08-02 12:12             ` Vasiliy Molostov
2012-08-02 12:01           ` Vasiliy Molostov
2012-08-02 21:12         ` Randy Brukardt
2012-08-02 20:59       ` Randy Brukardt
2012-08-02 12:13     ` Brian Drummond
2012-08-02 15:01       ` Robert A Duff
2012-08-02 21:18         ` Randy Brukardt
2012-08-02 23:15           ` Robert A Duff
2012-08-02 15:31 ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox