In a message dated Fri, 25 Aug 2006, Juerd writes:
Trey Harris skribis 2006-08-25 11:33 (-0700):
Ok... same thing from a DBC perspective. Subclasses can add functionality
(by AND'ing postconditions), or remove constraints (by OR'ing
preconditions), but they can't traditionally remove functionality or add
constraints. I just want to read about how that works.
The keyword is "traditionally". We're used to a dynamic language that
bends the rules all the time, including runtime. Why would Perl stick to
academic limitations, while optimizing for the most common use is the
standard?
my Array::Const @foo;
@foo ~~ Array; # False?! Please, no.
Though in practice I expect "is ro" to be used, not a subtype or subset.
Explain to me how "nontraditional" DBC might work in an internally
consistent way. Otherwise, this is hand-waving. :-)
Trey