Rant after trying Rust a bit

via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 25 08:03:50 PDT 2015


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.

Well, I am not sure if the flexibility scales up when clever 
library authors start to write flexible introspective code. It 
basically requires library authors to be careful and conservative.

Code coverage and unit tests cannot replace a robust type system 
when you get down to composable datastructures due to the 
combinatorial explosion you get.

> The idea that Rust traits check at compile time and D does not 
> is a total misunderstanding.

I'm not arguing in favour of copying Rust… I don't think becoming 
more like Rust will buy D more friends. It will just be an 
argument for picking Rust over D.

If I'd argue for something it would be for having a real 
deductive database at the heart of the templating type system.

> BTW, you might want to remove the UTF-8 characters from your 
> user name. Evidently, NNTP doesn't do well with them.

Hm. It works in the web interface when I reply to my own 
messages, maybe just a client issue?



More information about the Digitalmars-d mailing list