Re: routine_id() is not working
- Posted by jimcbrown (admin) Apr 12, 2013
- 1308 views
I suppose that explicit namespaces would override. What to do in the case where a file has a default namespace that clashes with a file name of another file included?
Well, default namespaces have this problem as well. There's nothing stopping me from editing eukat's sleep.e and changing the top line to 'namespace stdseq'.
That's true, but adding filenames now could break working code without changing the code.
Matt
Menno's peu solved this problem, though I'm not sure if we'd want to adopt it.
Hmm .. there might be other issues. What if someone wanted to include "e.ex" as well as "e.e" ? Or "e!.ex" ? Or "0error.e" ?
Now you're sounding like a wrongfull-injury lawyer. You are talking about willfully editing files to re-namespace them, or re-naming them to existing filenames.
The renaming examples were all real. "e!.ex" was the name of the file used by the e! intepreter, an Euphoria runtime interpeter (which broken when 2.4 came out and dynamic including was no longer possible). 0rror.e (or 0rror.c) is actually produced and used by the translator when bootstraping Euphoria itself. "e.ex" and "e.e" were shorthand for backend.e and backend.ex, in euphoria/source.
No matter what you make, someone will work hard enough to get injured by it.
Good point. That's excellent justification for leaving the entire namespace system as-is.