On 2015-07-24 06:43, Walter Bright wrote:
Consider the following:int foo(T: hasPrefix)(T t) { t.prefix(); // ok bar(t); // error, hasColor was not specified for T } void bar(T: hasColor)(T t) { t.color(); } Now consider a deeply nested chain of function calls like this. At the bottom, one adds a call to 'color', and now every function in the chain has to add 'hasColor' even though it has nothing to do with the logic in that function. This is the pit that Exception Specifications fell into.
I don't see the difference compared to a regular parameter. If you don't specify any constraints/traits/whatever it like using "Object" for all your parameter types in Java.
-- /Jacob Carlborg
