EssentialTypeScriptBook icon indicating copy to clipboard operation
EssentialTypeScriptBook copied to clipboard

method override behaviour

Open robin-raymond opened this issue 9 years ago • 0 comments

In a class-based language like C# or Java, I would use the TodoStateChanger class as my base class - creating new classes that derived from it so they could share most of its logic, but also have the ability to override behavior as they see fit.

As someone who comes from a virtualized language like C++ with overrides, I think a bit of expansion here is worth while. Specifically, the behaviour method overriding? Maybe you already expand on it later in the book though and I've not come to it yet.

Also while I was searching the legality of get / set properties I read something about the property override behaviour being different than expected. If that's true, it's also worth mentioning.

robin-raymond avatar Jun 12 '16 15:06 robin-raymond