Structs (was RE: Record selectors)

Matthias Lang matthias@REDACTED
Wed Jan 15 09:05:39 CET 2003


Chris Pressey writes:

 > Forgive me, but is Erlang really so object-shy that encapsulation is
 > something that we feel we can afford to avoid simply because "they" have
 > turned it into a meaningless buzzword?

If you have a language feature and call it an "object", then a large
number of people are going to be vocally disappointed that these
"objects" don't have member functions, inheritance, access control and...

What is an object? Asking google, I get

   An object has state, behavior, and identity; the structure and
   behavior of similar objects are defined in their common class; the
   terms instance and object are interchangeable

This is what Booch says. Does behaviour mean "functions with side
effects"? What does Rumbaugh have to say?

   We define an object as a concept, abstraction or thing with crisp 
   boundaries and meaning for the problem at hand.   

Pretty vague, despite the wishful inclusion of "crisp". 'Object' is a
word to avoid. Now, if only I could invent a record replacement I
could give it a new and cool name, like "mutable coagulator".

Matthias



More information about the erlang-questions mailing list