DConf '23 -- Getting from C to D without Tripping -- Steven Schveighoffer

Опубликовано: 16 Октябрь 2024
на канале: The D Language Foundation
963
49

C is the lingua franca of programming languages. Chances are, if something exists in the world of computer science, there is a version of it in C. But what if you use D? The great news is that any C project is almost trivially accessible via D. But what if you hate the problems that come with C? No overloading! No operators! Zero-terminated strings! Manual memory management! No memory safety! Many of these things led me to undertake a project of porting a quite broad and well-used C library to D. What might be in store for you if you decide to take this journey? Tune in to find out!

The PDF slides are available here:
https://dconf.org/2023/slides/schveig...

Dennis Korpel's DConf Online '22 talk (Translating C to D)
https://dconf.org/2022/online/#dennisk

ctod
https://github.com/dkorpel/ctod

draylib
https://github.com/schveiguy/draylib

raylib-d
https://github.com/schveiguy/raylib-d

Raylib
https://raylib.com

Referenced blog post (Teaching D from Scratch)
https://dlang.org/blog/2021/12/23/tea...

DConf '23 Homepage
https://dconf.org/2023/index.html

The D Programming Language Home
https://dlang.org/

#dlang #dconf

TIMECODES:
00:00 Prelude
02:30 Title & Introduction
03:05 A bit of history
04:39 Raylib & raylib-d
06:43 Binding C from D
10:37 Improving the binding
13:35 Porting C to D
23:48 Leaving some C
26:35 Making porting tools
37:39 Things that can't be automated
41:46 Improving the API
42:30 Addendum
43:29 Q: Did Steven try libclang and/or DPP?
45:12 Comments from Walter
46:39 Comment about the name "draylib"
46:57 Q about C preprocessor output
47:30 Comments about ImportC
50:03 Q: Can we remove the unreachable code warning?
50:35 Q about ImportC and strings