Thread overview
Iup and nukclear interface in D.
Jun 23, 2016
mogu
Jun 23, 2016
Mike Parker
Jun 23, 2016
mogu
Jun 23, 2016
David Nadlinger
Jun 24, 2016
Mike Parker
Jun 23, 2016
Jordan Wilson
Jun 24, 2016
mogu
June 23, 2016
http://code.dlang.org/packages/iupd
http://code.dlang.org/packages/nukleard

iupd removes all deprecated items in IUP, current version is IUP 3.18.
nukleard may have some bugs in name mangling. Does a struct's field name like `null`,
i changed it to null_, may be issue? Can pragma(mangle, "name") help in this context?
June 23, 2016
On Thursday, 23 June 2016 at 06:32:09 UTC, mogu wrote:
> http://code.dlang.org/packages/iupd
> http://code.dlang.org/packages/nukleard
>

A couple of points:

* All of those 'static immutable' you have would be better as manifest constants, or logically grouped in anonymous enums. The former are lvalues and will wind up in the data segment, but you likely don't need them to be.

* extern(C) functions should, at a minimum, be declared as @nogc and nothrow for client code using those attributes.


June 23, 2016
On Thursday, 23 June 2016 at 08:14:42 UTC, Mike Parker wrote:
> On Thursday, 23 June 2016 at 06:32:09 UTC, mogu wrote:
>> http://code.dlang.org/packages/iupd
>> http://code.dlang.org/packages/nukleard
>>
>
> A couple of points:
>
> * All of those 'static immutable' you have would be better as manifest constants, or logically grouped in anonymous enums. The former are lvalues and will wind up in the data segment, but you likely don't need them to be.
>
> * extern(C) functions should, at a minimum, be declared as @nogc and nothrow for client code using those attributes.

Thx, iup is the first project i tried to binding in D. So it has so many issues. They all be reconsidered in nuklear binding. Also, i'll fix iup binding after some busy company work.
June 23, 2016
On Thursday, 23 June 2016 at 06:32:09 UTC, mogu wrote:
> http://code.dlang.org/packages/iupd
> http://code.dlang.org/packages/nukleard
>
> iupd removes all deprecated items in IUP, current version is IUP 3.18.
> nukleard may have some bugs in name mangling. Does a struct's field name like `null`,
> i changed it to null_, may be issue? Can pragma(mangle, "name") help in this context?

Great, look forward to checking it out. Any plans for the CD library?
June 23, 2016
On Thursday, 23 June 2016 at 08:14:42 UTC, Mike Parker wrote:
> * extern(C) functions should, at a minimum, be declared as @nogc and nothrow for client code using those attributes.

Be careful, though, if the C library supports user-specified callbacks to be set for some functionality – unless you also require those to be @nogc, that guarantee could easily be violated.

 — David
June 24, 2016
On Thursday, 23 June 2016 at 23:01:16 UTC, David Nadlinger wrote:
> On Thursday, 23 June 2016 at 08:14:42 UTC, Mike Parker wrote:
>> * extern(C) functions should, at a minimum, be declared as @nogc and nothrow for client code using those attributes.
>
> Be careful, though, if the C library supports user-specified callbacks to be set for some functionality – unless you also require those to be @nogc, that guarantee could easily be violated.
>

True. I should have added that caveat myself.
June 24, 2016
On Thursday, 23 June 2016 at 20:04:51 UTC, Jordan Wilson wrote:
> On Thursday, 23 June 2016 at 06:32:09 UTC, mogu wrote:
>> http://code.dlang.org/packages/iupd
>> http://code.dlang.org/packages/nukleard
>>
>> iupd removes all deprecated items in IUP, current version is IUP 3.18.
>> nukleard may have some bugs in name mangling. Does a struct's field name like `null`,
>> i changed it to null_, may be issue? Can pragma(mangle, "name") help in this context?
>
> Great, look forward to checking it out. Any plans for the CD library?

Coming soon. :)