Re: object(x) rethink

new topic     » goto parent     » topic index » view thread      » older message » newer message

jacques deschĂȘnes wrote:
> 
> But for the coherance of the language this must be a valid declaration and
> must
> behave like any other datatype validation.
> There is nothing to change in the language here. All language that use generic
> type behave the same way.

I think, if I've understood Andy correctly, he is simply proposing that
object(x) returns true in all cases except when x has not been assigned a value,
in which case it returns false.

I agree with this as x is not truly an object until it has a value, until then
it is only a notion.

Perl has this concept with if defined(x), and even undef(x) to make x be
"unassigned".

The question as to whether to change the behaviour of the object type test comes
down to (IMHO) whether it is easy to do, whether a significant amount of code
relies on the current behaviour... oh and of course someone to actually
change/test/document the code :)

Gary

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu