Rant after trying Rust a bit

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 25 06:53:43 PDT 2015


On Saturday, 25 July 2015 at 12:09:34 UTC, Andrei Alexandrescu 
wrote:
>> However, making
>> it built-in feels really convenient in Rust:
>>
>> - considerably less function declaration visual noise
>> - much better error messages: trying to use methods of T not 
>> defined by
>> a trait will result in compile-time error even without 
>> instantiating the
>> template
>
> Yah, building stuff in does have its advantages.

I feel it is not as much about "built-in vs library", but 
"generic vs templates" - somewhat deeper ideological difference 
that consequently calls for different tools. Metaprogramming with 
traits in Rust is inconvenient to the point of being almost 
impossible but generics have a very strong static API 
verification. In D you can get destroyed by flow of deeply nested 
error messages but the magic you can do with templates with 
minimal effort investment is beyond comparison.

Different values, different trade-offs.


More information about the Digitalmars-d mailing list