Thoughts about D
Walter Bright
newshound2 at digitalmars.com
Wed Nov 29 02:18:20 UTC 2017
On 11/28/2017 9:27 AM, Jacob Carlborg wrote:
> Why would druntime be a barrier for you for those projects?
When the C version is 90K and the translated D version is 1200K, it is a
barrier. It's a barrier for others, as well.
Another barrier for me has turned out to be the way assert() works in D. It just
is not lightweight, and it visibly slows down dmd to have assert's turned on
internally. The amount of machinery involved with it in druntime is way
overblown. Hence, asserts in dmd are turned off, and that wound up causing me a
lot of problems recently. There are even initiatives to add writefln like
formatting to asserts. With betterC, asserts became lightweight and simple again.
Andrei's been directing some work on using templates more in druntime to reduce
this, such as Lucia's work. Martin has done some work with array ops, too.
Exception handling support has been a bloat problem, too. DMC++ is built with
all exceptions turned off. I've been writing PRs for dmd to greatly improve
things so that it can generate similar code for RAII. (Exceptions require druntime.)
BetterC is a door-opener for an awful lot of areas D has been excluded from, and
requiring druntime is a barrier for that.
More information about the Digitalmars-d
mailing list