On 16/04/16 06:56, André Rømcke wrote:
>> > This actually summarises many of the problems all of these 'extras' are
>> > creating for very little gain.
>> > 
>> > 'Seconds' is a 'Traditional Property' so is untyped and if accessed as a
>> > value from some OS's will be a floating point number[...]
> It wasn't really the example I intended to point to, it does not represent 
> the cases me and others refer to. I was linking to it for the possible 
> solution to handle type and immutability.
> 
> Examples for the latter:
> https://en.m.wikipedia.org/wiki/Value_object

Working from and SQL base ... the schema provides both validation beyond
simply 'int' or 'float' and 'read only' all simply extensions to the
basic variable returned.

>> > I don't see how the idea of 'optimizing' the compiled code has any
>> > bearing on handling a 'typed property' when one has to have an object to
>> > contain even the simple of type information?
> 
> What is this regarding?

People have been claiming they need to be able to identify the type in
order to optimize the compiled code. In my book even having decided a
variable is 'int' still requires that all of the rest of the code to
handle the variable needs to be available. The package of code may be
simplified if only a sub set of functions are required, but in my book
that is simply eliminating code that is not used ... it does not
specifically need identification of the subset of code and simply means
that a lot of additional handling code is added rather than one generic
set. We are not removing any of the untyped functionality so if you want
a more compacted code then use the compiled versions of PHP. The main
target for PHP should be handling the script more efficiently in the
first place, and having the 'string' version of a variable in many cases
is a requirement even if the variable is 'validated as' an integer in a
specific range of values. 'typing' is only providing a small subset of
the validation we have been using for many years! Even in C we have a
much better range of types available, but even there it does not replace
a proper data validation library!

-- 
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

Reply via email to