RE: objects and forth
Frédéric DUBOIS <[email protected]> Wed, 11 Feb 2009 13:12:15 +0100
| Newsgroups | gmane.comp.lang.forth.colorforth |
|---|---|
| Message-ID | <883CC0FAE31AE241BBAC751B05622E1A0576E1@serveur22.Synchronic.local> |
Hi list, I've read several times that the CREATE ... DOES> structure is a primitiv= e form of objet. It seems to me that it is more likely a closure, and the= theory says that closures may be used to model objets. I would be curiou= s to know if some Forth object system have done it this way. I believe that OO can be an excessive constrain and bulk. Some people hav= e stated that OO is a good design model, but a bad implementation model (= it has been stated also about the OSI networking layers). It seems to me = that it complicates things sometimes. For instance, if you look at the Ob= server pattern you notice that the interface-making device is inheretence= ; one has to create mutiple classes to achieve this pattern: two interfac= e classes, and two implementation classes. Using closures, the interface = device is only one function prototype. Since it has no CREATE DOES>, how does one does closures with CF?