On Tuesday, 13 December 2016 at 18:52:05 UTC, Andrei Alexandrescu wrote:
* People have noticed that certain simple uses of D trigger calls into druntime that are not quite justified. For example, assigning an array of int to another array of int issues a call into a function that uses dynamic introspection (!) to copy any array into any other array. A template present in object.d would trivially do this using introspection to boil down to memcpy.

I am in favor of templatizing more of druntime.
But please keep those templates simple.
I have noticed severe code-bloat at ctfe, and worse when ctfe-codegen miscompiles those templates,
there in way to know why!

It will work fine if the bodys are
- very simple (C-subset of D)
- use static if moderately
- please minimize the use of constraints they are wired when it comes to ctfe interaction

Reply via email to