Rant after trying Rust a bit

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 25 15:28:17 PDT 2015


On Saturday, 25 July 2015 at 00:45:06 UTC, Walter Bright wrote:
> On 7/24/2015 3:12 PM, deadalnix wrote:
>> On Friday, 24 July 2015 at 19:10:33 UTC, Walter Bright wrote:
>>> If I have a call tree,
>>> and at the bottom I add a call to interface X, then I have to 
>>> add a constraint
>>> that additionally specifies X on each function up the call 
>>> tree to the root.
>>> That is antiethical to writing generic code, and will prove 
>>> to be more of a
>>> nuisance than an asset.
>>>
>>> Exactly what sunk Exception Specifications.
>>
>> In many language you have an instaceof keyword or something 
>> similar. You'd get :
>>
>> if (foo instanceof X) {
>>    // You can use X insterface on foo.
>> }
>>
>> vs
>>
>> static if (foo instanceof X) {
>>    // You can use X insterface on foo.
>> }
>>
>> The whole runtime vs compile time is essentially an 
>> implementation detail. The
>> idea is the very same.
>>
>> The most intriguing part of this conversation is that the 
>> argument made about
>> unitests and complexity are the very same than for dynamic vs 
>> strong typing (and
>> there is hard data that strong typing is better).
>>
>> Yet, if someone would make the very same argument in the case 
>> of dynamic typing,
>> both Walter and Andrei would not give it a second though (and 
>> rightly so). Yet,
>> nowhere the reason why this differs in ay that make the 
>> cost/benefit ratio shift
>> is mentioned. It is simply asserted as such.
>
>
> I don't see how this addresses my point at all. This is very 
> frustrating.

I think it does. Your point is essentially an argument by 
ignorance: this is new, we don't really know, and it has been 
show in the past that what seems like a good idea (checked 
exception for instance) turns out horribly wrong, against all 
expectations.

My point is that it is not new, it is very much the same thing as 
what we've been doing ll along for several decades, the 
difference being mostly implementation details.

Also, argument from ignorance is hard to maintain when the thread 
is an actual feedback from experience.



More information about the Digitalmars-d mailing list