API names [was: ghc-6.0.1 and OpenGL enabled]

Thanks for all your replies, naming is obviously still one of the hottest topics in CS... Here are my thoughts: "locally" is (as already mentioned) too general, and "withFoo" is traditionally used for functions with a signature of the form: withFoo :: Foo -> ... But the current matrix is implicit, so this would not be a good choice for the combination of glPushMatrix/glPopMatrix. We are basically left with: saveFoo might not give a hint that a Foo is restored rememberingFoo same comment as above applies preservingFoo sounds good to me, but might be a bit long The current story for the combined GL calls is: glBegin/glEnd renderPrimitive glNewList/glEndList defineList glPushName/glPopName pushName glPushMatrix/glPopMatrix matrixExcursion glPushAttrib/glPopAttrib saveServerState glPushClientAttrib/glPopClientAttrib saveClientState The first two sound right to me, the third is actually a "withFoo", and the last three should be named in a consistent way. Combining your proposals I suggest: glBegin/glEnd renderPrimitive glNewList/glEndList defineList glPushName/glPopName withName glPushMatrix/glPopMatrix preservingMatrix glPushAttrib/glPopAttrib preservingAttrib glPushClientAttrib/glPopClientAttrib preservingClientAttrib Does this sound OK, especially for the native speakers on this list? Cheers, S.

The first two sound right to me, the third is actually a "withFoo", and the last three should be named in a consistent way. Combining your proposals I suggest:
glBegin/glEnd renderPrimitive glNewList/glEndList defineList glPushName/glPopName withName glPushMatrix/glPopMatrix preservingMatrix glPushAttrib/glPopAttrib preservingAttrib glPushClientAttrib/glPopClientAttrib preservingClientAttrib
Does this sound OK, especially for the native speakers on this list?
Sounds right to me [ aber ich bin kein Native Speaker ]. BTW, will there be a place in the docs where people coming from C could look up the equivalences? Perhaps a simple text file where I can just grep for a C name and get the corresponding Haskell name. Cheers, Wolfgang

Wolfgang Thaller wrote:
[...] BTW, will there be a place in the docs where people coming from C could look up the equivalences? Perhaps a simple text file where I can just grep for a C name and get the corresponding Haskell name.
I was hoping to avoid any additional work, so I've structured the modules and the Haddock docs strictly to the OpenGL specs (which I expect any serious OpenGL programmer has on his desk): There is a 1-to-1 correspondence between the sections of the spec and the modules listed in Graphics.Rendering.OpenGL.GL.html. Of course I will gladly include any additional documentation sent to me... :-) Cheers, S.
participants (2)
-
Sven Panne
-
Wolfgang Thaller