DerelictSASS

ponce via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Nov 23 13:17:22 PST 2014


On Sunday, 23 November 2014 at 19:36:16 UTC, Jacob Carlborg wrote:
> On 2014-11-23 01:26, Mike Parker wrote:
>
>> Some people may prefer the bindings to include more D 
>> features, but IMO
>> if you're going to put something out there for everyone and 
>> anyone to
>> use, particularly if you want to be consistent with other 
>> Derelict
>> bindings, it's better to avoid them.
>
> For more D features I would add a thin layer on top of the raw 
> bindings. Like creating wrappers for functions accepting C 
> strings and have them accept D strings instead.
>
> In this particular case I would probably have created the enum 
> as one would do in D and the alias the enum members to make 
> them accessible at module scope.

While I like language-friendly wrappers, they do tend to make 
some choices. They require additional documentation since new 
names and usage are introduced.

Sticking to the C API is choice-agnostic, existing documentation 
can be reused.



More information about the Digitalmars-d-announce mailing list