I'm trying to work through some of the more subtle changes in phpng and
one that sticks out is the loss of IS_BOOL. I think the explanation is
that it removes a read, but while I'm only seeing a few uses of is_bool
across the codebase, every one of them is used simply to convert the
bool value into some other format. Surely what would make more sense
here is simply to make the type_flag either true or false, and retain
the IS_BOOL as a single identifiable type? Having two types both
indicating 'bool' just seems wrong.
--
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
Hey:
I'm trying to work through some of the more subtle changes in phpng and
one that sticks out is the loss of IS_BOOL. I think the explanation is
that it removes a read, but while I'm only seeing a few uses of is_bool
across the codebase, every one of them is used simply to convert the
bool value into some other format. Surely what would make more sense
here is simply to make the type_flag either true or false, and retain
the IS_BOOL as a single identifiable type? Having two types both
indicating 'bool' just seems wrong.
there is a _IS_BOOL macro to identifiable bool type..
you can use it in your own codes.
thanks
--
Lester Caine - G8HFLContact - 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--
--
Laruence Xinchen Hui
http://www.laruence.com/
I'm trying to work through some of the more subtle changes in phpng and
one that sticks out is the loss of IS_BOOL. I think the explanation is
that it removes a read, but while I'm only seeing a few uses of is_bool
across the codebase, every one of them is used simply to convert the
bool value into some other format. Surely what would make more sense
here is simply to make the type_flag either true or false, and retain
the IS_BOOL as a single identifiable type? Having two types both
indicating 'bool' just seems wrong.
there is a _IS_BOOL macro to identifiable bool type..
you can use it in your own codes.
But THAT has to look for two types ... When the 'object' is simply 'bool'
I'm looking for the explanation as to why it HAS to change rather than
anything else. I can see that using the 64bit value field is overkill,
but there is still plenty of spare space in the TYPE element to not have
to create an extra object type? The two types of boolean just need a
different type_flags entry?
THEN is_false and is_true make sense as macro's of is_bool ...
--
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
I'm looking for the explanation as to why it HAS to change rather than
anything else. I can see that using the 64bit value field is overkill,
but there is still plenty of spare space in the TYPE element to not have
to create an extra object type? The two types of boolean just need a
different type_flags entry?THEN is_false and is_true make sense as macro's of is_bool …
Arguably nothing has to change, but this change makes sense. TRUE
and FALSE
are special values much like NULL, and there’s no real good reason not to have them be their own types like NULL
is, given the performance benefits and how it makes some types of code easier to write or less error-prone.
--
Andrea Faulds
http://ajf.me/