http://d.puremagic.com/issues/show_bug.cgi?id=3194
Diego Canuhe <canuh...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |canuh...@gmail.com --- Comment #2 from Diego Canuhe <canuh...@gmail.com> 2011-06-22 11:52:38 PDT --- (In reply to comment #1) > Patch for D2 > https://github.com/D-Programming-Language/dmd/pull/112 I disagree. Even while you can easily access protected methods of a class, they are intended for internal use, otherwise they'd be public. Consider: class A { abstract protected SomeType[] getData(); public void processData() { //do something that breaks the invariants foreach (SomeType element; getData()) { //do something... } //do something that restores the invariants } invariant() {...} } a class B derived from A implementing getData() shouldn't have to respect the invariants while entering/leaving getData(). Anything regarding getData()'s side-effects should be put in an out clause. BTW, abstract functions shouldn't require a body clause accompanying in and out clauses -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------