Re: Parsing problem using constants
- Posted by SDPringle Apr 16, 2011
- 1282 views
Well it's not quite so simple as that. Currently, you can include the EXACT same file multiple times and Euphoria only actually includes it once. But if two files that have the same name, but are in DIFFERENT folders are included, Euphoria treats them as two different files - even if they have identical contents. I'm not sure we would want to change this behaviour.
This ambiguous message that says 'cannot resolve %s' is a problem. There ought to be two messages, one '%s has not been declared' and another '%s has been declared more than once'. The second error message should show you where all of the other symbols with the same name are declared. We saw here a user that assumes it means one thing when it means the other. This helps in general.
For the standard library, we could replace the 3.1 .e files with files that only contain 'public include' statements such that at least the same symbols are visible as before. The fact that files in the distributed include directory contain up to three includes isn't a problem because you can just add the same 'public include's to dll.e as for misc.e.
Possible problems I see are name clashes user's existing code, as you will most likely have to include a superset of symbols most of the time; and sometimes a need to add more include files because of this lack of global behavior.
Shawn