Jump to page: 1 27  
Page
Thread overview
So what exactly is coming with extended C++ support?
Sep 29, 2014
Szymon Gatner
Sep 29, 2014
Jacob Carlborg
Sep 30, 2014
Szymon Gatner
Sep 29, 2014
bachmeier
Sep 29, 2014
Wyatt
Sep 30, 2014
Szymon Gatner
Sep 30, 2014
Chris
Sep 30, 2014
Szymon Gatner
Sep 30, 2014
John Colvin
Sep 30, 2014
Szymon Gatner
Sep 30, 2014
Chris
Sep 30, 2014
Szymon Gatner
Sep 30, 2014
Szymon Gatner
Oct 14, 2014
Dan Olson
Oct 14, 2014
Szymon Gatner
Oct 15, 2014
Dan Olson
Oct 15, 2014
Szymon Gatner
Oct 15, 2014
Jacob Carlborg
Oct 16, 2014
Dan Olson
Oct 17, 2014
Jacob Carlborg
Sep 30, 2014
Johnathan
Sep 30, 2014
Szymon Gatner
Sep 30, 2014
po
Sep 30, 2014
Paulo Pinto
Sep 30, 2014
po
Sep 30, 2014
Araq
Sep 30, 2014
Szymon Gatner
Sep 30, 2014
Szymon Gatner
Sep 30, 2014
Marc Schütz
Sep 30, 2014
Paulo Pinto
Sep 30, 2014
po
Sep 30, 2014
simendsjo
Sep 30, 2014
Paulo Pinto
Sep 30, 2014
Paulo Pinto
Sep 30, 2014
Paulo Pinto
Sep 30, 2014
Ethan
Sep 30, 2014
Sean Kelly
Oct 01, 2014
Ethan
Sep 30, 2014
Cliff
Oct 01, 2014
Marc Schütz
Oct 01, 2014
Kiith-Sa
Oct 01, 2014
Paulo Pinto
Oct 14, 2014
Nick Sabalausky
Oct 14, 2014
Szymon Gatner
Oct 15, 2014
Paulo Pinto
Oct 14, 2014
Walter Bright
Oct 14, 2014
Meta
Oct 15, 2014
Szymon Gatner
Oct 15, 2014
Jacob Carlborg
Oct 15, 2014
Daniel N
Oct 15, 2014
Paulo Pinto
Oct 16, 2014
Daniel N
Oct 17, 2014
Daniel N
Oct 16, 2014
Jacob Carlborg
Oct 15, 2014
Szymon Gatner
Oct 15, 2014
Walter Bright
Oct 15, 2014
Wyatt
Oct 15, 2014
Daniel Murphy
September 29, 2014
Hi,

recently there is much talk about extending C++ interop in D but it is unclear to me what that means. Functions and virtual class methods are already callable. What else is planned in the near future? Exceptions? Support for C++ templates? (that seems difficult no?).

Is VS support planned (I think I saw Andrei only asking about GCC support for exceptions/stack unwining)? Atm it does not really work (even building x64 exe with D lib linked).

From the PoV of small game developer relying its livelihood on C++ I must say that this is great thing. If I had better support for 2 things now: C++ interop so we could just start writing new code in D and ARM/iOS then we would just move immediately.

In short, I am very happy (but only if you remember about VC users!) to hear about this direction. Some people here seem to think that this is not relevant effort but clearly they don't have existing C++ code to maintain and deal with.
September 29, 2014
On 29/09/14 12:00, Szymon Gatner wrote:
> Hi,
>
> recently there is much talk about extending C++ interop in D but it is
> unclear to me what that means. Functions and virtual class methods are
> already callable. What else is planned in the near future? Exceptions?
> Support for C++ templates? (that seems difficult no?).

Using templates are already supported. Note, they need to instantiated on the C++ side.

> Is VS support planned (I think I saw Andrei only asking about GCC
> support for exceptions/stack unwining)? Atm it does not really work
> (even building x64 exe with D lib linked).
>
>  From the PoV of small game developer relying its livelihood on C++ I
> must say that this is great thing. If I had better support for 2 things
> now: C++ interop so we could just start writing new code in D and
> ARM/iOS then we would just move immediately.

Don't know if this is what you're looking for but this pull request [1] adds support for extern(Objective-C).

[1] https://github.com/D-Programming-Language/dmd/pull/3987

-- 
/Jacob Carlborg
September 29, 2014
On Monday, 29 September 2014 at 10:00:27 UTC, Szymon Gatner wrote:

> From the PoV of small game developer relying its livelihood on C++ I must say that this is great thing. If I had better support for 2 things now: C++ interop so we could just start writing new code in D and ARM/iOS then we would just move immediately.

Is that all it would take? Do you also need a GC-free standard library, which seems to be the need of all the others saying "do this and I'll switch from C++"? Are the tools good enough?

I don't think anyone is saying C++ interop is unimportant. There are a lot of us already using the language and we don't think C++ interop is the only thing that has value. More important IMO would be releasing a compiler without a bunch of regressions. D is a lot more than a C++ replacement for Facebook or video game developers.
September 29, 2014
On Monday, 29 September 2014 at 20:15:06 UTC, bachmeier wrote:
>
> Is that all it would take? Do you also need a GC-free standard library, which seems to be the need of all the others saying "do this and I'll switch from C++"? Are the tools good enough?
>
No relation to OP, but I can tell you it is unbelievably more important.  For the most part, deficiencies in Phobos can reasonably be worked around or improved.  The body of useful libraries written in C++ can't.

> I don't think anyone is saying C++ interop is unimportant. There are a lot of us already using the language and we don't think C++ interop is the only thing that has value.

That's true, but how many wheels are you really willing to reinvent?  And how many man years are you willing to spend doing it?

-Wyatt
September 30, 2014
On Monday, 29 September 2014 at 20:15:06 UTC, bachmeier wrote:
> On Monday, 29 September 2014 at 10:00:27 UTC, Szymon Gatner wrote:
>
>
> Is that all it would take? Do you also need a GC-free standard library, which seems to be the need of all the others saying "do this and I'll switch from C++"? Are the tools good enough?

Considered how many games (and I don't mean indie anymore, but for example Blizzard's Heartstone) are now created in Unity which uses not only GC but runs in Mono I am very skeptical of anybody claiming GC is a no-go for games. - Especially- that native executable is being built in case of D.

I realize AAA's have have their reasons against GC i but in that case one should probably just get UE4 license anyway.

Tooling is acceptable for me tbh. Coming from C++ I don't have high expectations anyway. The only good debugger (for C++) is VC++ and so far I'v had surprisingly good experience with VisualD and mixed C++/D application. Stepping into function (between language boundries!) just works. Viewing variable values works properly too whether I in on *.cpp or .d file atm. Overall, can't complain too much especially I am getting all those goodies for free ;)

Anyway, I accept that I would be an early adopter and I am OK with some cons that come with it as I see more gains overall.

Btw, I think D is THE language to implement gameplay. Compilation times make it on par with scripting languages and since it becomes compiled there are no JIT restrictions on iOS for example. In our case AI will get rewritten from C++/Lua to D as soon as it is practical which s not just yet unfortunately.


>
> I don't think anyone is saying C++ interop is unimportant. There are a lot of us already using the language and we don't think C++ interop is the only thing that has value. More important IMO would be releasing a compiler without a bunch of regressions. D is a lot more than a C++ replacement for Facebook or video game developers.

Don't get me wrong, I too want all those issue resolved, just saying for myself that (lack) of those features blocks us from adopting at all. And after we're on board I suspect I will join some other unhappy camp :P But for now we can't even get there.


September 30, 2014
On Monday, 29 September 2014 at 14:36:10 UTC, Jacob Carlborg wrote:
> On 29/09/14 12:00, Szymon Gatner wrote:
>> Hi,
>>
>> recently there is much talk about extending C++ interop in D but it is
>> unclear to me what that means. Functions and virtual class methods are
>> already callable. What else is planned in the near future? Exceptions?
>> Support for C++ templates? (that seems difficult no?).
>
> Using templates are already supported. Note, they need to instantiated on the C++ side.

Ah, cool, but I still have no clue what to expect from ongoing discussion on C++ interop. Does anyone know?

>
> [1] https://github.com/D-Programming-Language/dmd/pull/3987

Yup, I saw it and this makes me very happy. iOS run-time is still an issue tho.
September 30, 2014
On Tuesday, 30 September 2014 at 08:48:19 UTC, Szymon Gatner wrote:
> On Monday, 29 September 2014 at 20:15:06 UTC, bachmeier wrote:
>> On Monday, 29 September 2014 at 10:00:27 UTC, Szymon Gatner wrote:
>>
>>
>> Is that all it would take? Do you also need a GC-free standard library, which seems to be the need of all the others saying "do this and I'll switch from C++"? Are the tools good enough?
>
> Considered how many games (and I don't mean indie anymore, but for example Blizzard's Heartstone) are now created in Unity which uses not only GC but runs in Mono I am very skeptical of anybody claiming GC is a no-go for games. - Especially- that native executable is being built in case of D.

Very interesting.

> I realize AAA's have have their reasons against GC i but in that case one should probably just get UE4 license anyway.
>
> Tooling is acceptable for me tbh. Coming from C++ I don't have high expectations anyway. The only good debugger (for C++) is VC++ and so far I'v had surprisingly good experience with VisualD and mixed C++/D application. Stepping into function (between language boundries!) just works. Viewing variable values works properly too whether I in on *.cpp or .d file atm. Overall, can't complain too much especially I am getting all those goodies for free ;)
>
> Anyway, I accept that I would be an early adopter and I am OK with some cons that come with it as I see more gains overall.
>
> Btw, I think D is THE language to implement gameplay. Compilation times make it on par with scripting languages and since it becomes compiled there are no JIT restrictions on iOS for example. In our case AI will get rewritten from C++/Lua to D as soon as it is practical which s not just yet unfortunately.

It's good to hear that. Maybe you could write a short article about that once you've moved to D. "Porting games to D" or something like that. With D you can develop fast due to short compilation times, that's important for testing and prototyping.

iOS/ARM are very important. What's the latest state of affairs? I know some progress has been made but it has been off my radar for a month or two now.

>>
>> I don't think anyone is saying C++ interop is unimportant. There are a lot of us already using the language and we don't think C++ interop is the only thing that has value. More important IMO would be releasing a compiler without a bunch of regressions. D is a lot more than a C++ replacement for Facebook or video game developers.
>
> Don't get me wrong, I too want all those issue resolved, just saying for myself that (lack) of those features blocks us from adopting at all. And after we're on board I suspect I will join some other unhappy camp :P But for now we can't even get there.

September 30, 2014
On Tuesday, 30 September 2014 at 08:48:19 UTC, Szymon Gatner wrote:
> I realize AAA's have have their reasons against GC i but in that case one should probably just get UE4 license anyway.

UE4 uses a GC internally. The issue with using D's GC for games is a matter of quality/adaptability.
Allocations in games should be rare (and after game startup, should mostly be small objects, if there's any allocations at all), so a GC for games would need minimal pauses and extremely quick small allocations.
September 30, 2014
On Tuesday, 30 September 2014 at 09:32:05 UTC, Chris wrote:
>
> It's good to hear that. Maybe you could write a short article about that once you've moved to D. "Porting games to D" or something like that. With D you can develop fast due to short compilation times, that's important for testing and prototyping.
>

I actually was planning on something like that. I am still thinking about writing on automatic binding generation between D and Lua using D's compile-time reflection. Add a UDA to a function, class, method a voila! You can call it from Lua. Magic!
September 30, 2014
On Tuesday, 30 September 2014 at 09:53:41 UTC, Johnathan wrote:
> On Tuesday, 30 September 2014 at 08:48:19 UTC, Szymon Gatner wrote:
>> I realize AAA's have have their reasons against GC i but in that case one should probably just get UE4 license anyway.
>
> UE4 uses a GC internally. The issue with using D's GC for games is a matter of quality/adaptability.

True, but not in the sense that it is using GC-based language. It is custom C++ solution tailored for the purpose.

> Allocations in games should be rare (and after game startup, should mostly be small objects, if there's any allocations at all), so a GC for games would need minimal pauses and extremely quick small allocations.

All true again, pre-allocation can fix lots of pause issues. And simply not using GC in tight loops. While not the greatest fan of Unity, it proved that GC (on top of of VM) is not a concern for (I argue) most of gamedev. Minecraft was originally written in Java for crying out loud yet it didn't stop it from becoming gigantic success.

« First   ‹ Prev
1 2 3 4 5 6 7