DMD supports ranges, but druntime can't see them?

Timo Sintonen t.sintonen at luukku.com
Thu May 23 09:46:14 UTC 2019


On Thursday, 23 May 2019 at 06:41:04 UTC, Mike Franklin wrote:

>> Oh, and druntime must go.
>> 
>> The whole distinction between the runtime library and the 
>> standard library is clowny and has more to do with poorly 
>> ported tradition from other languages, than with anything else.
>> 
>> We need one standard library that is entirely pay-as-you-go 
>> (e.g. empty main() means no library file is ever needed for 
>> linking) and that offers an opt-in continuum.
> ---
>
> So, the divide between druntime and phobos shouldn't even 
> exist.  But what does a united druntime/Phobos look like?  How 
> do we organize it logically, and modularly with clear 
> boundaries, so it doesn't turn into a tangled mess and users 
> only pay for what they use?  I don't know, but I'm trying to 
> figure that out.
>

We actually do need a runtime library. It should contain code for 
compiler generated runtime function calls. Nothing else. Users 
should have no need to import it or even have access to it.

The rest should be moved. User callable code might go to phobos. 
Files that have only bindings and definitions might be in phobos 
or in utiliD. Then there is code and imports that are not for 
users but used internally in the library. I am not sure where 
they should be but utiliD might be a good place.

What is left in runtime should not depend on phobos or utiliD. 
Some libc calls are always needed but they shoud be used as 
little as possible.





More information about the Digitalmars-d mailing list