Simplicity vs confusion
Bugzilla Link | 130 |
Created on | Oct 09, 2005 16:27 |
Resolution | WONTFIX |
Resolved on | Oct 10, 2005 18:00 |
Version | svn |
OS | Linux |
Architecture | PC |
Attachments | crud, sel.sac, foo |
Extended Description
I'm either bit confused here or there's something funny with imports (USEs) in the stdlib modules. If I do, for example, "use Array.sac:all;", then "use String.sac:all;", sac2c complains about duplicate definitions for various primitives. I can get around this specific failure by careful inclusion/exclusion, but suspect there is a general problem here where I could get into a situation where the conflict can not be resolved at the source program level, and I'd have to make custom copies of stdlib modules to circumvent the problem. Here are two proposals for solutions to this problem: 1. Allow multiple USEs of the same module, and throw away the duplicates fairly early in the compilation process. 2. Remove ALL "use *.sac" statements from modules. Perhaps leave them as comments, so the user of a module can add them, if needed.