[Swift-devel] Re: Import Statement

Michael Wilde wilde at mcs.anl.gov
Thu Jul 8 20:59:36 CDT 2010


Jon, your idea sounds good to me, unless others with a deeper understanding of Java, Python, etc feel we need different semantics.

I think plain pathname-based resolution ala C include files makes sense for Swift. for now.

Ben implemented the initial import feature; he, Mihael, and Justin should weigh in as well.

We also discussed easing the restriction on where in the source file the import statement can be placed; there may be some reason (ease of implementation?) why its constrained to the start of the file as it is now.

- Mike


----- "Jonathan Monette" <jon.monette at gmail.com> wrote:

> Mike and Justin,
>      I think I have found out where to change the way the import 
> statement works.  Right now when you import the file has to be in the
> 
> current directory.  I would like to change this so that you can
> specify 
> an actual path(relative or absolute path)to the script to be imported.
>  
> But I would like your opinion on how should it look.  I am leaning 
> towards the C style i.e. "src/file".  I am open to opinions and 
> discussion.  Maybe the opinion is that it shouldn't be changed.  Just
> 
> need more input for the decision.
> 
> -- 
> Jon
> 
> Computers are incredibly fast, accurate, and stupid. Human beings are
> incredibly slow, inaccurate, and brilliant. Together they are powerful
> beyond imagination.
> - Albert Einstein

-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-devel mailing list