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: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 504 |
Nodes: | 16 (2 / 14) |
Uptime: | 252:06:12 |
Calls: | 9,892 |
Calls today: | 1 |
Files: | 13,794 |
Messages: | 6,294,508 |