Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Object Identity

From: joel:neely:fedex at: 23-Feb-2003 8:03

Hi, Sergio, Thanks for the reference. At a first read, it appears to identify some pros and cons for even being able to test identity from a fairly "pure OO" perspective. REBOL has some characteristics that differ from the mainstream object-oriented model: 1) OBJECT! is only one of many data types, but values of many standard data types can be thought of as entities with composite state and type-specific behavior; 2) REBOL's type system is highly dynamic: 2a) it takes a unique "definitional" approach to binding time; 2b) all types (almost) are first-class; 2c) there's a high degree of reflectivity; 2d) it's object model is totally classless, without the use of encapsulation or inheritance -- an object can serve as an exemplar for creating a new object, but there are no class-to-subclass, class-to-instance, parent-to-child, or prototype/delegate relationships as found in various other languages; 2e) once created, an object's attributes may be examined or redefined (e.g. replacing a method with a scalar value, replacing one method with another -- although binding is a bit tricky at that point). With all of that said, perhaps you have thoughts on some other issues that were part of the discussion: 1) What does "identity" mean for non-object types? (e.g. are all occurrences of the integer 2 to be identified or not? If so, should instances of 2.0 be identified with 2?) 2) What should "equality" mean for functions? 3) What should "equality" mean for objects (which can have attributes of type FUNCTION!)? Sergio Ruocco wrote: