View mode: basic / threaded / horizontal-split · Log in · Help
July 28, 2012
Re: Glamour – An opengl wrapper for D
On Thursday, 26 July 2012 at 13:47:42 UTC, David wrote:
> https://github.com/Dav1dde/glamour
>

Just did a wrapper myself for a project I'm working on. But I 
would be happy to join forces.

I have a couple of nitpickings though:

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

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).

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

/Jonas
July 28, 2012
Re: Glamour – An opengl wrapper for D
> 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.
July 29, 2012
Re: Glamour – An opengl wrapper for D
On Saturday, 28 July 2012 at 21:21:58 UTC, David wrote:
> 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.

You are throwing consistency out of the window because of your 
own personal preference. You shouldn't be using the same style 
regardless of language and project.

>> 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.

It's in your best interest to use the D style [1] if you want 
people to use your code.

[1] http://dlang.org/dstyle.html
July 29, 2012
Re: Glamour – An opengl wrapper for D
On Saturday, 28 July 2012 at 21:21:58 UTC, David wrote:
>> 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.

Fair enough.

I really do prefer to have a consistent style thoughout code 
bases I work with because it makes it much easier to reason 
about. Since phobos is the standard library that kind of dictates 
the styling for me :)

I've managed to find another project that does the same as 
Glamour and with the standard D style. I think I'll go with that 
one for now:

https://github.com/p0nce/gfm/tree/master/opengl

/Jonas
July 29, 2012
Re: Glamour – An opengl wrapper for D
> I've managed to find another project that does the same as Glamour and
> with the standard D style. I think I'll go with that one for now:
>
> https://github.com/p0nce/gfm/tree/master/opengl

Do whatever you wanna do ;)
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home