toString refactor in druntime

Manu via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 2 23:45:33 PST 2014


On 2 November 2014 04:15, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 11/1/2014 6:35 AM, Manu via Digitalmars-d wrote:
>>
>> I'd say that I'd be nervous to see druntime chockers full of templates...?
>
>
> What's a chocker?

It's Australian for 'lots'.


> Why would templates make you nervous? They're not C++ templates!

What do you mean? How are D templates any different than C++ templates
in a practical sense?

I want a binary lib to be a binary lib. I don't think it's good form
for the lowest level library in the language ecosystem to depend on
templates (ie, client-side code generation).
This is the fundamental lib that will be present in every D
application there is. If it is not a binary lib, then it can't be
updated.

Consider performance improvements are made to druntime, which every
application should enjoy. If the code is templates, then the old
version at time of compiling is embedded into existing client
software, the update will have no effect unless the client software is
rebuilt.
More important, what about security fixes in druntime... imagine a
critical security problem in druntime (I bet there's lots!); if we
can't update druntime, then *every* D application is an exploit. Very
shaky foundation for an ecosystem...

druntime is a fundamental ecosystem library. It should be properly
semantically version-ed, and particularly for security reasons, I
think this should be taken very very seriously.

This argument could equally be applicable to phobos, and I've always
been nervous about it too for the same reasons... but I'll draw a line
there, in that phobos is not critical for an application to build and
link, and so much of the API is already templates, it would be
impossible to change that now.


More information about the Digitalmars-d mailing list