On Sun, Nov 30, 2008 at 6:19 PM, Alex Chapman <[EMAIL PROTECTED]> wrote: > And then we have words. These are also symbols, but when executed they do > something arbitrary. This could include pushing their own symbol, so in a > way symbols are a subset of words:
All of the things you described (symbols, classes) are also words. > A more general version of this problem is: Should adding a vocab to your > USING statement (or a change in a USEd vocab) ever change the behaviour of > your program? This is completely orthogonal to the issue at hand. > I don't think it should, and always using an explicit \ is one way of > ensuring this. Using \ explicitly does not ensure this at all. Consider you have this code: IN: a : foo "lol" throw ; IN: b TUPLE: foo x y z ; Now this program: IN: c USING: a b ; : bar ... \ foo ... ; is not the same as this program: IN: c USING: b a ; : bar ... \ foo ... ; Even though both foo's are quoted using \. > Of course, we can put our IN: below our USING: so that > anything we define takes precedence over anything USEd, but this is a bit of > a hack. It doesn't work consistently when we're experimenting in the > listener, and any vocab using our vocab has to put our vocab last (or is it > first?) in their USING: statement if they want to use our unquoted symbol > rather than the other vocab's conflicting word. If you want, you can use the qualified vocabulary's FROM: word to explicitly control what words are imported. FROM: sequences => each reverse ; FROM: math => + - ; IN: my-vocab ... Slava ------------------------------------------------------------------------- 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 Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk