http://d.puremagic.com/issues/show_bug.cgi?id=5056


nfx...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nfx...@gmail.com


--- Comment #4 from nfx...@gmail.com 2010-10-16 10:14:32 PDT ---
The really bad thing is that D doesn't allow you to set up a sub class before
calling the super constructor. Consider this:

class Foo : Moo {
  int stuff;
  this(int stuff_) {
    this.stuff = stuff_;
    super();
  }
  override int get_stuff() {
     return stuff;
  }
}

This won't compile, because the compiler forces you to do the super ctor call
_before_ setting up any members. This was probably thought as a feature to
ensure "correct" construction, but it just doesn't work because the super ctor
could call virtual functions. And it's really hard to work this around.

This behaviour of super ctor calls and virtual functions has been badly
thought-through and doesn't increase productivity in the slightest. Sucks a
lot.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to