Taking D to GDC Europe - let's make this tight

Ethan Watson via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 12 04:27:18 PDT 2016


http://schedule.gdceurope.com/session/d-using-an-emerging-language-in-quantum-break

My proposal for a talk has been accepted, and I'll be in Cologne 
next month presenting to industry peers.

One of the things I was asking during the approval process was 
whether attendees tended to be more on the game programming side 
or the tech/engine programming side. They don't have that data. 
Looking at the rest of the talks on the schedule, there does 
appear to be a bit of a lack of technical talks. So that pretty 
much settles it for me, I'm going to go a bit in-depth on D. I've 
been seeing this talk as basically a sales pitch to the rest of 
the industry to check D out, and going in-depth means its time to 
shine.

The general gist of the talk will broadly cover what both my talk 
at DConf this year and Manu's talk at DConf in 2013 covered. But 
to break up the flow a bit, I intend on inserting examples of 
ways D saves time. Take the lighting talk I did about a simple 
interpolation function - illustrate the problem in C++, and the 
solution in D. But because there's options out there for 
languages these days, I also want equivalent solutions in Rust 
(as that is the most likely other option). I might also add a 
column for Swift so I can write "LOLNO" for each problem. Perhaps 
also relevant is C# equivalents as that has quite a lot of 
support in game programming these days thanks to Unity.

The examples are also meant to highlight specific language 
features. The interpolation example highlights template 
constraints and type inspection. And they're going to be based on 
code I've either written for Quantum Break, or had to spend an 
unholy amount of time getting to work in C++ recently.

Mainly here, I would like the assistance of someone that has used 
Rust and can provide Rust-based examples that perform the same 
task. Stefan Koch was also illustrating some of the modern 
syntactic shortcuts on IRC last night, I've been programming in a 
DMD that was released in 2013 for a while so getting up to speed 
on modern D programming with my examples will help make this even 
tighter than I can otherwise make it by myself.

The examples I'm looking at using (aiming for a spacing of about 
one every 10-15 minutes in the talk, so 4 in total):

* Generic interpolation function
   - Already illustrated at DConf for both C++ and D
   - C++ - Unmaintainable, buggy mess
   - Rust - No idea
   - D - Write once, handle any type thanks to type inspection
   - D feature demonstration: template constraints, type inspection

* Check a type for an equality operator
   - C++ - SFINAE whackiness, and as near as I can tell requires 
separate tests to determine if an object has a member operator 
and/or a global operator for comparison tests
   - Rust - No idea
   - D - Simple is() check wrapped in an enum
   - D feature demonstration: is, static if for further use

* Expansion of code for a script wrapper to a native function 
(retrieve parameters and pass to native)
   - C++ - Pre-C++11 is a mess but doable. Will focus on C++11, 
which requires template parameter inference, compile time number 
range generation, and calling a function with two dummy instances 
of objects to allow the inference to happen.
   - Rust - No idea
   - D - Haven't written the code, but intend on using mixin with 
strings
   - D feature demonstration - mixin, mixin template

* Fourth example TBD, might try to make it tie in to the binding 
system which means I'll cover CTFE.

Speaking of the binding system, the plan is to open source it for 
the talk. I'm in the process of cleaning it up right now for such 
purposes.


More information about the Digitalmars-d mailing list