On 12/08/16 09:43, Michał Brzuchalski wrote: > About ReadOnly I'm currently working on `immutable` feature proposal where > could be > possible to mark class and properties as immutable (ReadOnly after > initialisation) > so it could solve problem with ReadOnly ValueObjects and immutable > properties > which are simple primitives.
This all comes back to the basic variables ;) I can see the attraction of making an object 'immutable' which may be a set of readonly variables. Initializing that obviously needs to bypass the block, and MAY require that some variables are initialised in order for others to then be populated, which just highlights again that having a set of simple variables each of which can be managed on it's own, is then wrapped in a workflow to ensure the resulting 'readonly' object is initialized correctly with the variables supplied. *I* am thinking particularly here about timestamp and that the current 'mess' of built in code which I still have to wrap to make it work with those generated in my database code. The immutable version of that is pointless much of the time, and I simply switch to a readonly BIGINT value so it will work on 32 bit platforms. The raw view of the data can vary depending on if you are using seconds or days as a base but both bases eventually produce a variety of displays with managed time offsets. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php