Glamour – An opengl wrapper for D

David d at dav1d.de
Sat Jul 28 14:21:57 PDT 2012


> 1, Why is the member method naming not using the standard camel case
> formatting as e.g. phobos does but uses underscore instead.

This is my personal coding-style, heavily influenced by Pythons PEP-8. I 
am using it, because I personally don't like the camelCase, because I 
think it makes e.g. distinguishing members from types harder or reading 
the names and I also don't like the look of it.

> 2, The gl3n library which glamour uses is pretty nice. It does use
> underscores as well but not consistently e.g. Quaternion.rotatey().
> Additionally the type aliases (e.g. alias mat4) are lowercased which is
> not the standard and is also not how it is done in glamour (e.g  alias
> Texture3D).

`Quaternion.rotatey`, `Matrix.rotatey` – to be honest, I don't know why 
I named them like that (same with the static counterparts `y_rotation`). 
Maybe I should change it, but I don't think that's really bad or breaks 
the general coding style.

The aliases are lowercased to match `glsl`.

> How would you feel about changing the naming to the standard D
> conventions? I'll help you out if you think this ok.

Not a fan of that, this would break existing code and has no real benefits.



More information about the Digitalmars-d-announce mailing list