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