3rd blog article around the Pascal/Delphi language is here!! Brought by Marcos Douglas B. Santos for tmssoftware.com : "Object Pascal: Redefining Classes"

3rd blog article around the Pascal/Delphi language is here!! Brought by Marcos Douglas B. Santos for tmssoftware.com : "Object Pascal: Redefining Classes"
https://www.tmssoftware.com/site/blog.asp?post=448
https://www.tmssoftware.com/site/blog.asp?post=448

Comments

  1. This is a Delphi specific trick historically called an interposer class: blog.marcocantu.com - Handbook Note 67/113: Interposer Classes

    It is good to reiterate this topic, as few people consciously know its uses and limitations.

    The class is not actually being redefined, generates different RTTI, but since it is closer in scope the code using it sees it in place of the original class.

    Not just the RTTI is different, the code using it can detect it and can even go back to the original. In addition, memory layout can be different especially for classes descending from the original.

    These two limitations urges one to limit its use to cases where there is absolutely no other better way to solve a problem at hand.

    ReplyDelete

Post a Comment