|
Re: where to "put" a unification algorithm...: msg#00079lang.smalltalk.squeak.beginners
You can put it there, yes. But there is an important design question lurking there. If you put the unification method on these classes, what you are really saying is: this Smalltalk object can be unified with that Smalltalk object. So you are then extending the Smalltalk language with unification. The alternative is to only have unification methods un your own 'unifiable objects' hierarchy. In that hierarchy you will probably have a class called: CWNumber, which represents numbers in your language and which will hold a Smalltalk number. Which alternative to choose depends on whether, and how deep, you want to integrate Smalltalk and your own language. Unless you really want to mingle Smalltalk objects within your language, or want unification directly accessible at the Smalltalk level without having to pass through your language, I would advise the second option. ( If you are interested I have a number of papers I can point you to, since I did research on integrating a Prolog in Smalltalk ) On 16 Feb 2007, at 16 February/06:34, Chris Wright wrote: I would like to play around with some classes which require
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: where to "put" a unification algorithm..., Todd Blanchard |
|---|---|
| Next by Date: | Re: where to "put" a unification algorithm..., Chris Wright |
| Previous by Thread: | Re: where to "put" a unification algorithm..., Chris Wright |
| Next by Thread: | Re: where to "put" a unification algorithm..., Chris Wright |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |