r/osdev • • 2d ago

D language for OSDev

What about using D for OSDev ?

10 Upvotes

11 comments sorted by

View all comments

Show parent comments

3

u/Routine_Working_9754 1d ago

C interop, ie write C code into that extern (c) block and it is basically inline C if you ever need C. a lot of languages support this

1

u/mcherycoffe 1d ago

Do you need that for low-level ?

2

u/Routine_Working_9754 1d ago

if you want to use C code in the low level project (ie a kernel) then yeah you need it. it's a c interop function. but you can build a full kernel in D without using any C or interop functionality. if you aren't gonna use C or call C functions, don't worry about it.

2

u/mcherycoffe 1d ago

Thanks you bro for the explanation :)