Michel Fortin пишет: > On 2009-02-08 23:43:13 -0500, Weed <[email protected]> said: > >> Michel Fortin пишет: >>> On 2009-02-08 09:30:08 -0500, Weed <[email protected]> said: >>> >>>> Let's assume, polymorphism is necessary to these objects >>> >>> Polymorphism doesn't work very well while passing objects by value, even >>> in C++. This is called the slicing problem. >>> <http://stackoverflow.com/questions/274626/what-is-the-slicing-problem-in-c> >>> >>> >>> >>> I think D does a good job at avoiding that problem. >>> >> >> By performance loss >> :( > > No. By forbiding the cases that leads to slicing, like returning a > polymorphic object by value. >
Let's think, can there are other ways to solve problem? Here, for example my reasons: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=81958
