> - I like the 'require' idea for behaving as if the argument were added to
> the command line (for some file types - I'm not saying you should be able
> to require "--fast" but maybe that would be fun for some people)
To be clear, my current draft of 'require' doesn't permit arbitrary flags
to be taken, just filenames.
> - I'd like to see 'require' also support .chpl files, and in that case,
> work as a non-importing use. That is, it would cause the .chpl file to be
> read in and compiled - and the functions etc available through the
> ModuleName.symbol syntax but not imported directly
Some of us were discussing this a bit yesterday at lunch. A good argument
for not overloading 'use' for this purpose is similar to what you're
saying. That is:
use Foo; // which maybe loads a Foo.chpl
vs.
use "Foo.chpl";
would have very different implications. Unless the latter meant "compile
it and make its symbols available in this scope", which might be
convenient, but also seems confusing. This discussion was pushing me even
more strongly toward a different keyword:
require "Foo.chpl";
> - require'ing a C header file seems to me to be doing something a bit
> different - since it makes the header file symbol names available to the C
> compiler later... so it's importing it into a scope in the C compilation
> but not into the Chapel compiler's scope. Should you 'use' a C header file
> and 'require' a C source or object file?
I don't think any of the 'require' statements are importing anything into
the Chapel-level scope -- we still rely fully on externs for that. It's
really just stating a requirement for successful compilation and linking
of the program.
-Brad
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers