Re: extern(C) with function returning user type

2015-08-01 Thread Kyoji Klyden via Digitalmars-d-learn
On Saturday, 1 August 2015 at 04:11:02 UTC, Laeeth Isharc wrote: Walter observes that if you are a Java programmer and start writing D, you will write D like you write Java. And so I suppose one will see what one doesn't have in Java, but not so much the benefits of D. That's true of other

Re: extern(C) with function returning user type

2015-07-31 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 31 July 2015 at 21:35:30 UTC, Kyoji Klyden wrote: On Friday, 31 July 2015 at 19:13:18 UTC, Laeeth Isharc wrote: On Friday, 31 July 2015 at 17:14:29 UTC, Kyoji Klyden wrote: On Friday, 31 July 2015 at 16:09:23 UTC, bachmeier wrote: On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji

Re: extern(C) with function returning user type

2015-07-31 Thread bachmeier via Digitalmars-d-learn
On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote: So idk, it feels silly and counterproductive to have D not able to natively use C libraries. Are we just gonna have to write D bindings to every notable library out there? Also I don't see how it'd be problematic, if you don't want a

Re: extern(C) with function returning user type

2015-07-31 Thread Kyoji Klyden via Digitalmars-d-learn
On Friday, 31 July 2015 at 16:09:23 UTC, bachmeier wrote: On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote: So idk, it feels silly and counterproductive to have D not able to natively use C libraries. Are we just gonna have to write D bindings to every notable library out there?

Re: extern(C) with function returning user type

2015-07-31 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 31 July 2015 at 17:14:29 UTC, Kyoji Klyden wrote: On Friday, 31 July 2015 at 16:09:23 UTC, bachmeier wrote: On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote: So idk, it feels silly and counterproductive to have D not able to natively use C libraries. Are we just gonna

Re: extern(C) with function returning user type

2015-07-31 Thread Kyoji Klyden via Digitalmars-d-learn
On Friday, 31 July 2015 at 19:13:18 UTC, Laeeth Isharc wrote: On Friday, 31 July 2015 at 17:14:29 UTC, Kyoji Klyden wrote: On Friday, 31 July 2015 at 16:09:23 UTC, bachmeier wrote: On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote: So idk, it feels silly and counterproductive to have

Re: extern(C) with function returning user type

2015-07-30 Thread bachmeier via Digitalmars-d-learn
On Thursday, 30 July 2015 at 01:14:06 UTC, Mike Parker wrote: On Wednesday, 29 July 2015 at 18:42:45 UTC, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a round about solution almost working. :P Really? I see it as

Re: extern(C) with function returning user type

2015-07-30 Thread Kyoji Klyden via Digitalmars-d-learn
On Thursday, 30 July 2015 at 11:32:10 UTC, bachmeier wrote: On Thursday, 30 July 2015 at 01:14:06 UTC, Mike Parker wrote: On Wednesday, 29 July 2015 at 18:42:45 UTC, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a

Re: extern(C) with function returning user type

2015-07-30 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-07-29 20:42, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a round about solution almost working. :P You might want to check out Calypso [1] as well. [1]

Re: extern(C) with function returning user type

2015-07-29 Thread Kyoji Klyden via Digitalmars-d-learn
Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a round about solution almost working. :P

Re: extern(C) with function returning user type

2015-07-29 Thread Ali Çehreli via Digitalmars-d-learn
On 07/29/2015 10:59 AM, Kyoji Klyden wrote: How would I use a C function that's returning a struct? The binding file must have a matching D struct. auto doesn't work here, and from what I can tell D can't import C headers. (If it really can't then, that would be a very welcome feature)

Re: extern(C) with function returning user type

2015-07-29 Thread anonymous via Digitalmars-d-learn
On Wednesday, 29 July 2015 at 17:59:26 UTC, Kyoji Klyden wrote: How would I use a C function that's returning a struct? auto doesn't work here, and from what I can tell D can't import C headers. (If it really can't then, that would be a very welcome feature) I do have the required libs but I

Re: extern(C) with function returning user type

2015-07-29 Thread yawniek via Digitalmars-d-learn
On Wednesday, 29 July 2015 at 17:59:26 UTC, Kyoji Klyden wrote: How would I use a C function that's returning a struct? auto doesn't work here, and from what I can tell D can't import C headers. (If it really can't then, that would be a very welcome feature) I do have the required libs but I

Re: extern(C) with function returning user type

2015-07-29 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 29 July 2015 at 18:42:45 UTC, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a round about solution almost working. :P Really? I see it as one of D's strengths. It's much easier to connect D with C than