> In this word: > > : elt ( :array :integer -- :object ) swap nth ; > > The inputs and outputs are unnamed. You can name them for > documentation > purposes: > > : elt ( a:array i:integer -- obj:object ) swap nth ; > > But even if you don't name them, they'll have the names "array", > "integer", > etc in the documentation. So in help articles you can refer to "the > array" > or "the integer". > > This raises the question of multiple signature elements with the > same type: > > : append ( :array :array -- :array ) ... ; > > In the help, the names will be autogenerated: array-a, array-b, > array-c. So in > help articles you can refer to "array-a", etc. > > On the other hand, you can name a signature element without > specifying a > class: > > : suffix ( :sequence obj -- :sequence ) ... ;
That all looks reasonable, Ed. In this scheme, how would you declare a generic without defining any methods on it? Would something like this work? DEFER: suffix ( seq obj -- seq ) And is there any way to distinguish defining a new word in the current vocab from adding a method to a generic in an imported method? I'm also curious as to how hook methods would look--would you guys retain the HOOK: and M: words for that purpose? -Joe ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
