Ed, I think you're talking about "multiple dispatch", which I don't think Factor supports. So, the only way to dispatch on two arguments is to build your own dispatch mechanism, I believe.
Yuuki :) On Mar 1, 2007, at 7:58 PM, Eduardo Cavazos wrote: > Hello, > > As I said in my last note, in smalltalk all the classes are always > available. > > Let's think about how this would look in Factor. The first step is > to load all > the modules in libs, apps, and demos. That's the easy part. The > second step > is to do this: > > USING: ... ; > > Where every single vocabulary in in that ... . At this point you > will have an > environment that is like smalltalk where everything is available. > > There is a problem. If you call a word, the Factor parser searches > the USING: > list in order and takes the first one it finds. In Factor, if more > than one > vocabulary names a word with the same name, you have to explicitly > tell the > parser which one you want. In Smalltalk, this is never a problem. > Classes can > have methods named the same thing and the system figures out which > method to > call based on which object you are sending it to. > > The point of generic functions (words) is that they dispatch on > more than one > argument. Factor has this capability but how much do we use it? > These are > interesting questions: > > 1 - How many generic functions are in Factor? > 2 - How many of those dispatch on more than one argument? > > All the generic functions which dispatch on a single argument would > be better > defined as "message passing" methods. > > You can have generic functions and message passing in the same system. > > Would you rather worry about having classes or words clashing in > name? The > question is easy to answer: which one do you have more of? In any > system, you > will always have more methods than classes. Message passing wins here. > > Ed > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Factor-talk mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/factor-talk ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
