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

Atila Neves atila.neves at gmail.com
Thu May 23 13:01:58 UTC 2019


On Thursday, 23 May 2019 at 11:00:13 UTC, Mike Franklin wrote:
> On Thursday, 23 May 2019 at 09:46:14 UTC, Timo Sintonen wrote:
>
> Walter and Andrei don't appear to like that idea.  What they 
> appear to propose is to make *all* runtime constructs 
> templates.  The runtime library is automatically imported, but 
> because it's all templates, there's nothing to link.  Users 
> opt-in to a feature by simply using it.  Either the instantiate 
> one of the runtime templates explicitly, or by using the 
> feature, the compiler lowers an expression to a runtime 
> template implicitly.

I would also favour this approach.

> I'm skeptical of that.  For example, do we need to declare 
> `class Object() {}` instead of `class Object {}` in the runtime 
> template library?  And think how that would need to scale all 
> the way down the call stack if each runtime implementation, and 
> constructs it uses, and each construct that those constructs 
> use all need to be templated.  And what would that do to 
> compile-times? Each module would have to re-compile all the 
> runtime stuff they utilize.  And what about the potential for 
> template bloat?

These are good questions.

I've never understood complaints about template bloat however. If 
the linker does its job, does it matter that individual object 
files are larger?





More information about the Digitalmars-d mailing list