Rant after trying Rust a bit
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 24 17:45:07 PDT 2015
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.
More information about the Digitalmars-d
mailing list