Testing for Equality in ColdFusion

posted by Chris on Dec 15, 2010 at 22:45

I had a long chat with Bob Silverberg last night about how to test for equality between objects in ColdFusion and just noticed that Ben Nadel mentioned a very similar issue in his post on creating proxy components where he wanted to test for object reference equality, ie two variables pointing to the same object in memory. So i thought i'd write up what we discovered. The problem I was discussing with Bob was how to test if the value of two objects was the same, the objects would typically be a ColdFusion Component of which we would have no knowledge of the properties or methods.