giD v0.9.2 GObject Introspection binding repository and generator with Gtk4 support
Element Green
element at kymorphia.com
Tue Feb 18 01:35:56 UTC 2025
On Tuesday, 18 February 2025 at 00:30:55 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> On 18/02/2025 1:16 PM, Element Green wrote:
>> I got another request for making the names lower case. I
>> guess that would be **snake_case** for the modules and just
>> lowercase for the package names? So for example
>> `pangocairo.font_map.FontMap` would be the
>> `package.module.class`. I'm considering making these changes,
>> since it was only recently released and I have the version <
>> 1.0 for a reason. I must admit though that I prefer CamelCase
>> but understand the reasons for using lowercase packages and
>> modules (for case insensitive file systems).
>
> If you are generating these modules, and its coming from the
> source material, stick with the source material for names.
>
> Otherwise you could get conflicts at a later point in time (not
> good).
Well its GObject Introspection which is flexible with respect to
how languages utilize it for creating language bindings. It is
encouraged to utilize it in a way that feels native from what I
understand. It seems like most languages use TitleCase for
namespaces and class names, but snake_case for function names.
This includes Python, C++, and Rust from what I can tell. This
matches what is in the GIR files.
At the moment giD matches this, other than I'm using camelCase
for function/method/enum value names instead of snake_case.
I like it how it is, but I want to make sure it isn't too
offensive to D programmers ;-)
More information about the Digitalmars-d-announce
mailing list