Talk on D at DORS/CLUC

RazvanN razvan.nitu1305 at gmail.com
Mon May 20 08:03:12 UTC 2024


On Thursday, 16 May 2024 at 12:51:06 UTC, Martyn wrote:
> On Monday, 13 May 2024 at 09:10:58 UTC, RazvanN wrote:
>> ...
>>
>> Thanks everyone for your suggestions. I will how I can put 
>> everything together in a 30 min talk. I'll keep you updated on 
>> how it went!
>>
>> Regards,
>> RazvanN
>
> Please do.
> I think templates is definitely an area to cover (and wow!)

Hello all,

I had the talk on Friday and I think it went pretty well. Looking 
back, I think that if you have the chance to have such talks it's 
definitely a good idea to do them because it really sparks some 
interest. I'm going to describe a bit how things went in the idea 
that this may help other people promoting D.

Since the time was short I included only 3 code examples:

- one small program that showcased nice things like dynamic 
arrays, UFCS, CTFE, local imports etc.
- one small program that presented some template features like 
template constraints, is expressions, __traits(compiles), static 
if. The example used some DbI to reflect on some arrays and 
classes.
- one small example of importC.

All in all, it seemed that folks were pretty impressed with the 
language. UFCS and and __traits(compiles) are definitely brow 
raisers among the audience, however, the coolest moment that had 
the biggest impact factor was when I compiled and ran a C program 
using the D compiler - I asked the audience if someone noticed 
something weird and people were definitely impressed by this.

Templates are quite cool and they do appeal the inner nerd, but 
the reality is that not so many people use templates. If you're 
not a library writer, chances are you'll stick to using normal 
functions.

After my talk, some people that were using C++ came to talk to 
me. They're biggest problem was they were having buffer overflows 
which corrupted memory that were not caught by their linters. 
They liked the idea of automatic bounds checks and the fact that 
you can incrementally transition to D, however, they were 
wondering how safe is D when you are not using the GC. They also 
mentioned that they considered using Rust, however, it's pretty 
much an overkill for their use case. I told them that for their 
use case they can simply manually allocate memory and then create 
an array which contains the size information. The compiler will 
then check every access to the array for out of bounds indexes, 
however, they will still need to manage the memory manually. All 
in all, they seemed willing to try D, however, we cannot since if 
they will actually do it.

In conclusion:

- templates are impressive, however, it might be that audiences 
are not that fond of them
- UFCS and CTFE are good concepts to start a presentation with - 
easy to understand and impressive
- importC was the star of my show
- GC is something that C++ people worry about when thinking about 
D.

Hope this helps,
RazvanN


More information about the Digitalmars-d mailing list