Rant after trying Rust a bit

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 26 08:19:14 PDT 2015


On 7/25/15 6:48 PM, deadalnix wrote:
> On Saturday, 25 July 2015 at 09:40:52 UTC, Walter Bright wrote:
>> On 7/25/2015 12:19 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?=
>> <ola.fosheim.grostad+dlang at gmail.com> wrote:
>>> The point of having a type system is to catch as many mistakes at
>>> compile time
>>> as possible. The primary purpose of a type system is to reduce
>>> flexibility.
>>
>> Again, the D constraint system *is* a compile time system, and if the
>> template body uses an interface not present in the type and not
>> checked for in the constraint, you will *still* get a compile time error.
>>
>> The idea that Rust traits check at compile time and D does not is a
>> total misunderstanding.
>>
>
> Obvious, everything is at compile time here. Still, there is 2 steps,
> compiling the template (equivalent to compile time in the dynamic
> dispatch case), and instantiating the template (equivalent to runtime in
> the dynamic dispatch case).
>
> That is the exact same problem.

Probably that's the root of all disagreement. So we have template 
writing time, template instantiation time, and just run time. I think 
template instantiation time is a lot "closer" to template writing time 
than run time. -- Andrei



More information about the Digitalmars-d mailing list