The Future of D Runtime

Dukc ajieskola at gmail.com
Thu Jun 6 14:24:47 UTC 2024


Adam Wilson kirjoitti 6.6.2024 klo 2.58:
> Proposed Design
> ---------------
> 
> My proposal is that we expand DRT into a universal system interface for 
> the standard library. DRT would contain low-level interfaces for 
> Terminal and File I/O, threads, event-loops, sockets, cryptography, 
> anything that would normally access a system API. Why go to all this 
> effort? Simple, so that we can move beyond the limitations imposed by 
> the C Runtime. Using the CRT was certainly expedient in the early days 
> of D, but we’ve grown beyond that and it’s time to upgrade our 
> capabilities >

I very much like the general idea here. I just don't think we should 
consider non-core shards as part of what we call the runtime. I believe 
"runtime" means what you call "compiler support". A monolithic runtime 
can also be a platform abstraction for the standard library like you 
write, but that's not what makes it a runtime.

I think the core DRuntime should have those stability guarantees you 
write about, and be considered part of the language, not of the standard 
library. But for other shards, I think they should either be part of 
Phobos, or alternatively a separate component that isn't DRuntime nor 
part of the spec/compiler, but not of Phobos either. If they have a 
similar non-removal guarantee as the DRuntime like you suggested, 
there's no need to version them like Phobos will be versioned between 2 
and 3.


More information about the Digitalmars-d mailing list