Michael Lazzaro wrote:

I think this is one (rare) case where an UPPERCASE or unusual name might not be a bad idea, so it will BRING ATTENTION to the fact that you're using a unusual method.

$obj.ID;
$obj.IDENTITY;

If don't think we'll have much of a chance at teaching people to _always_ use ($obj.*id == $obj.*id) instead of ($obj.id == $obj.id).
I agree.

My understanding of what Larry was proposing would have the majority of cases where people would want to use $obj.*id, $obj.id would work as well. If that is the case, there is no incentive for the majority of programmers to be careful enough to use the longer form $obj.*id instead of the shorter $obj.id form. Especially when explaining what the * in *id does has to be done.

I feel that, in cases were $obj.id would have a natural interpretation in the class meaning something other than an object-specific ID, developers would be bit too often by careless use of $obj.id when $obj.*id is needed.

MikeL






Reply via email to