C++17

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 26 12:43:06 PST 2016


On Tue, 26 Jan 2016 20:22:19 +0000, rsw0x wrote:

> On Tuesday, 26 January 2016 at 20:05:16 UTC, deadalnix wrote:
>> On the other hand, D's type system can be leveraged to reduce lock
>> contention on the GC (and not lock at all on thread local allocs).
> 
> There's no such thing in D.
> 
> shared int* i = new int(5);
> int* l = new int(5);
> 
> these call the same exact functions with the same exact typeid.

Which means that the checks regarding shared are performed at compile 
time and not at runtime. That's perfectly valid.

The type system is also mostly expressed at compile time -- there's no 
runtime check inserted at the start of each method ensuring that each of 
its class-based parameters is in fact of the required type. That's not a 
problem.


More information about the Digitalmars-d mailing list