Rant after trying Rust a bit

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


On Saturday, 25 July 2015 at 10:01:43 UTC, Walter Bright wrote:
> On 7/24/2015 10:59 PM, Jonathan M Davis wrote:
>> In any case, looking at this, I have to agree with you that 
>> this is the same
>> problem you get with checked exceptions / exceptions 
>> specifications - only worse
>> really, because you can't do "throws Exception" and be done 
>> with it like you can
>> in Java (as hideous as that is). Rather, you're forced to do 
>> the equivalent of
>> listing all of the exception types being thrown and maintain 
>> that list as the
>> code changes - i.e. you have to make the top-level template 
>> constraint list all
>> of the sub-constraints and keep that list up-to-date as the 
>> sub-constraints
>> change, which is a mess, especially with deep call stacks of 
>> templated functions.
>
> Phew, finally, someone understands what I'm talking about! I'm 
> really bad at explaining things to people that they aren't 
> already familiar with.
>
> I'm not sure, but I suspect this problem may cripple writing 
> generic library functions that do one operation and then 
> forward to the next (unknown in advance) operation in a chain.
>
> It also may completely torpedo Andrei's Design By Introspection 
> technique.

This only make sense under the premise that both technique are 
mutually exclusive, which they aren't, and that no introspection 
can be done, which nobody argues against (I'm not sure what Rust 
provide here, but if they don't allow it, they'll regret it).



More information about the Digitalmars-d mailing list