core.traits?
kinke
noone at nowhere.com
Tue Jan 8 21:23:40 UTC 2019
On Tuesday, 8 January 2019 at 01:44:08 UTC, Mike Franklin wrote:
> Anyway, my suggestion is to create a new library separate from
> druntime and phobos that has no dependencies whatsoever (no
> libc, no libstdc++, no OS dependencies, no druntime dependency,
> etc.). I mean it; **no dependencies**. Not even object.d.
> The only thing it should require is a D compiler.
>
> That library can then be imported by druntime, phobos, betterC
> builds, or even the compiler itself. It will take strict
> enforcement of the "no dependency" rule and good judgment to
> keep the scope from ballooning, but it may be a good place for
> things like `traits`, `meta` and others.
I also feel the need for at least 1 another base library. My
focus is on the fundamental compiler support functions, like
initializing/comparing/copying arrays and general associative
arrays support, as they are fundamental to the language and their
compilers (not talking about TypeInfos, ModuleInfos, Object etc.).
I think we need such a base library in order to improve -betterC
and its available language features. The important thing would be
to try to reduce the external dependencies of that lib to an
absolute minimum, similar to rust's core library (just 5 symbols:
mem{cpy,cmp,set} + rust_begin_panic + rust_eh_personality),
although we'll probably need some some primitives, e.g.,
malloc/realloc/free. If that's possible, using D for bare-metal
targets without a C library (e.g., a future WebAssembly version
with direct access to GC, or your own OS kernel/firmware) would
probably become awesome, as you'd only need to implement maybe a
dozen of symbols.
More information about the Digitalmars-d
mailing list