If both X and Y contain foo, then saying just "foo" is ambiguous and the >compiler flags it as an error. You are required to say X.foo or Y.foo
to indicate which one you want.
Is there a simple way to do something like that in Forth, to get an
error or at least a warning, if the same symbol occurs in multiple
wordlists in the search order?
Of course that only produces a warning if you actually access FOO
(unlike what you specified), but I think it's the same for Haskell.
In Haskell, if you import packages X and Y, and X contains a symbol
"foo", you can refer to it as just "foo" or explicitly as X.foo.
If both X and Y contain foo, then saying just "foo" is ambiguous and the >compiler flags it as an error. You are required to say X.foo or Y.foo
to indicate which one you want.
Is there a simple way to do something like that in Forth, to get an
error or at least a warning, if the same symbol occurs in multiple
wordlists in the search order?
Thanks.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,030 |
Nodes: | 10 (0 / 10) |
Uptime: | 24:21:42 |
Calls: | 13,346 |
Calls today: | 3 |
Files: | 186,574 |
D/L today: |
1,847 files (484M bytes) |
Messages: | 3,357,732 |