I admit this is a bit of an esoteric question, but I ran into a situation where I was comparing two functions and would like some clarification.
Through from some experimentation I've deserned the following:
'Grabbing 'pointers' to existing functions
x = SomeFunction
y = SomeFunction
(x = y) = True
'Single Anonymous Function
x = Function ( )
Return 1
End Function
y = x
(x = y) = True
'Two Anoymous Functions
x = Function ( )
Return 1
End Function
y = Function ( )
Return 2
End Function
(x <> y) = True
'From an "object"
obj = CreateSomeObject()
x= obj.Function1
y = obj.Function1
(x = y) = True
'Different functions from same "object"
'From an "object"
obj = CreateSomeObject()
x= obj.Function1
y = obj.Function2
(x <> y) = True
'Same function on different "objects"
obj1 = CreateSomeObject()
obj2 = CreateSomeObject()
x = obj1.SomeFunction
y = obj2.SomeFunction
(x = y) = True
This all seems to make sense, but none of it is documented from what I can find. The ifFunction interface only lists the GetSub() and SetSub() functions (nothing in regards to comparison), and there are no details on the semantics of equality listed out.
Can I consider the above equalities stable, or are they likely to change in the future?
-Mark