{dmd, druntime} -> {dmd+druntime} i.e. Monorepo?
Dukc
ajieskola at gmail.com
Mon Aug 23 13:04:37 UTC 2021
On Monday, 23 August 2021 at 07:51:52 UTC, IGotD- wrote:
> Yes, if you for example want to develop a special druntime,
> then it is better to have dmd and druntime separated as you
> don't need the extra dmd baggage.
>
> A similar argument can be done to merge phobos and druntime
> because they are somewhat connected as well. I'm not suggesting
> this however.
These two are totally dissimilar cases.
Everything in `core` is part of the language. Any D compiler is
allowed to specially recognize functions in the `core` API. And
vice-versa, any D compiler is allowed to translate language
constructs to DRuntime calls. The latter is done in DMD for
`assert` failures and `new`, for example. It follows that what
DRuntime is fundamentally dependent on the compiler
implementation, and there is a good case for having a same
repository for both of them.
Conversely the `std` is just a library that obeys normal language
rules. It's implementation should try to avoid compiler
implementation dependency where possible, and no D compiler
should handle anything in `std` namespace as special. Ideally,
you could compile multiple different versions of Phobos with any
D compiler. I don't think Phobos is nearly that portable in
practice but that's the ideal. It follows that it should always
be a separate repository from the compiler and/or DRuntime.
More information about the Digitalmars-d
mailing list