8 Jul
2013
8 Jul
'13
9:19 a.m.
08.07.2013 12:33, Klaim - Joël Lamotte:
This is surely a controversial feature. I see some use of properties, like allowing to add checks on setting values to a type which was a simple struct initially (which happen a lot in data-centric designs).
If check does not need any internals of enveloping object, or does not need to be overridable by enveloping class descendants - which is often the case - then in C++ - it should be done just like normal concrete class, with invariants established in constructors. -- Evgeny Panasyuk