A betterC modular standard library?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 20 04:49:53 PST 2016


On 12/20/2016 4:30 AM, Ilya Yaroshenko wrote:
> This is true for application but not for libraries. mir-glas depends on
> mir-cpuid. If I want GLAS to be ported for a new target then I will release a
> new CPUID version and will be able to use it the same day. With DRuntime (as
> solid project), I need to wait up to 6 months before it will be released with
> DMD and then with LDC. Workaround are possible, but they requires more efforts,
> more time, more code.
>
> Please do not force Mir to use DRuntime. We need a solid solution
>
> I do not force anyone to drop DRuntime: Mir libraries can be used with
> DRuntime/Phobos. We have full backward compatibility. DRuntime does not satisfy
> portability requirements (which was repeated multiple times in this thread).
> DRuntime (at least for now and future few years) is a big constraint for betterC
> libs to replace existing C analogs.

Here's how anyone can override druntime's cpuid for their application without 
touching druntime:

     dmd -c mycpuid
     dmd myapp mycpuid.o

I.e. the way linkers work is if the symbol's definition exists, it is not pulled 
in from the library.

 > Please do not force me to use DRuntime.

I don't propose forcing anyone to use Druntime. What I do propose is reducing 
interdependencies among the object files in Druntime. Druntime is not a 
monolithic chunk of code, it is a library of object files.

I don't see the need to rewrite cpuid because its sole dependency on other 
object files in Druntime is the static constructor, because the static 
constructor can be adjusted to not rely on anything else in Druntime.

If there are other issues with cpuid, please elucidate.


More information about the Digitalmars-d mailing list