Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

D lang

Name: Anonymous 2017-02-01 11:21

So there's this D language that was recently used to make AAA game "Quantum Break" and here's a talk about that: http://dconf.org/2016/talks/watson.pptx

But, having said all that, I’m a convert. D’s compile time features are not only far superior to what C++ offers, but when compared to contemporary emerging languages like Rust, Swift, and Go, there’s no competition. I have no real desire to use those languages purely down to the lack of compile time code functionality in comparison to D.

Why aren't you using this awesome language when it's so much better than Sepples or the meme languages?

Name: Anonymous 2017-02-01 11:27

because quantum break is shit

Name: Anonymous 2017-02-01 11:31

>>2
The shit parts are all due to Sepples, the good parts due to D.

Name: Anonymous 2017-02-01 13:47

>>1
http://dconf.org/2016/talks/watson.pptx
What the shit is going on with the download server? 241 Bytes/s? 9hrs remaining?

D’s compile time features are [...] superior
I'm intrigued, what features is he/she talking about? If someone wants to inform me, you have 9 hours, before I can read it up myself.

Name: Anonymous 2017-02-01 14:14

>>4
Takes 5 seconds to download for me.

As for features, I'm not sure either, but here are some excerpts from the slides:

D’s usage in our codebase came about thanks to our programmers wanting a rapid iteration system. We settled on compiling native code in to dynamically linked modules. As such, our pipeline is set up so that D source code is actually data that our asset processors will convert in to final binary form.

As we have a ton of C++ code, it was critical to be able to hook in to C++ code and likewise for the C++ code to be able to hook in to the D code. A binding system was created, using #defines on the C++ side to expose interfaces and functions to D; and user-defined attributes and mixin templates to automate the work for exposing interfaces and functions back to C++. String resolves are currently used to match them all up, but that will move over to compile time generated hashes now that our main platform, Visual C++, has decent enough support for const expressions in the 2015 version.

As the system was implemented for rapid iteration, it needed to be able to support reloading the code on the fly. Compile time code inspection and generation was utilised to automatically serialise D structs and classes to JSON, which was then passed back in to an object created from a new DLL instance for deserialisation. Using JSON meant that binary layouts changing aren’t a problem as we string compare to find the correct values to deserialise to.

class DebugGraph
{
Vector2 m_vTopLeft;
Vector2 m_vBottomRight;

enum { Version = 3, RequiredVersion = 2 };

OSP_BEGIN( DebugGraph, Version, RequiredVersion )
OSP_VARIABLE( m_vTopLeft, 2 );
OSP_VARIABLE( m_vBottomRight, 3 );
OSP_END;
};

OSP_DEFINE( DebugGraph );


For reference, this is the boiler plate code required for a C++ object to have reflection capabilities in our code. The variables exist as normal, and then we have to define an OSP block – Object Stream Processor – which defines and adds functions for the declared variables with the declared versions. And further down in the .cpp source file, you need a further define that instantiates all the static data that the OSP block requires. That OSP_DEFINE is something of a bugbear of mine –thanks to templates. We have templated types that need to OSP, and you need an OSP_DEFINE for each template usage explicitly. All of this boilerplate just disappears when using the export class mixin, and thanks to user defined attributes any information needed on a variable such as version numbers gets defined with the variable instead of in a separate block. We also hit natural limits of the compiler, and while our content library uses the OSP extensively we can’t just have all the OSP_DEFINEs in a single file any more.

Name: Anonymous 2017-02-01 15:57

>>5
What I'm getting from this is that if you have a big pile of shit, it makes it somewhat easier to manage your big pile of shit.

Name: Anonymous 2017-02-01 18:26

>>5
So they sandwiched a layer of JSON for linking (and API versioning) between C++ and D? Seems to me the major thing they did was API versioning, linking between C++ and D should have been possible before, no?

Name: Anonymous 2017-02-01 18:28

pptx
wtf dude, this is not a .ps, how am I supposed to read it?
Think of others before doing such an irresponsible action next time.

https://dlang.org/spec/type.html
Oh look! Yet another ``modern'' language with retarded ``types''.

Name: Anonymous 2017-02-01 18:37

>>8
IHBT.

Name: Anonymous 2017-02-01 18:42

>>9
You're just saying that so you can play the victim.

Name: Anonymous 2017-02-01 18:46

dubz

Name: Anonymous 2017-02-01 20:49

>>8
The equivalent of member function pointers can be constructed using anonymous lambda functions:
The FP turdware infection is spreading.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List