Cairo Deimos bindings
James Miller
james at aatch.net
Fri Apr 27 21:03:37 PDT 2012
On Friday, 27 April 2012 at 20:49:54 UTC, Andrej Mitrovic wrote:
> On 4/27/12, Marco Leise <Marco.Leise at gmx.de> wrote:
>> In C:
>> STATUS_SUCCESS
>>
>> In D unmodified:
>> cairo_status_t.STATUS_SUCCESS
>>
>> In D with cosmetic changes:
>> cairo_status_t.SUCCESS
>
> cairo_status_t.SUCCESS is like going halfway there but
> stopping. It
> looks rather ugly imo. I think you either want the existing C
> names,
> or names that *fully* fit the D coding style. So maybe the
> choice
> should be between this:
>
> cairo_status_t.STATUS_SUCCESS
>
> and this:
>
> CairoStatus.Success
I'm going for the second one, due mostly to the fact that if I'm
going to change the enum to fit in with D, I might make it fit in
with D style-wise. The difference in style should help to make it
obvious to spot.
Also, most functions would get covered by a wrapper, but there is
little use to wrapping enums, so it is worthwhile making it nice
to work with in "normal" D code.
--
James Miller
More information about the Digitalmars-d
mailing list