Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   Mutable Classes vs. immutable objects (https://www.delphipraxis.net/200947-mutable-classes-vs-immutable-objects.html)

DP News-Robot 10. Jun 2019 14:10

Mutable Classes vs. immutable objects
 
It is possible to have the convenience of using mutable classes to construct objects gradually, setting properties and execution options beyond the use of constructors, but with the advantage of getting immutable instances at the end of the process. And I'm not talking about the Builder pattern. Incidentally you should not need to construct a class to create an instance of another class...

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:55 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz