[Swift-user] Updated Swift Tutorial

wilde at mcs.anl.gov wilde at mcs.anl.gov
Thu Jun 3 10:53:30 CDT 2010


Thanks, Ben - good points all. Some notes below.

----- "Ben Clifford" <benc at hawaga.org.uk> wrote:

> Not particularly a comment on the tutorial, but looking at that now
> makes 
> me pretty convinced that:
> 
>   type file;
> 
> should be defined by default.

Yes. Its low prio but if anyone wants to try this, feel free.

> > A development version of Swift after 0.2 (revision 1230) introduces
> a 
> > sequential iteration construct.
> 
> Thats so far in the past that you can maybe not comment about it?
> 

yes

> > 4.3. Writing a mapper
> 
> That talks about writing stuff in java. I think experience shows that
> 
> people prefer to express their own mappings using the ext mapper - so
> that 
> whole 4.3 section could turn into an ext mapper tutorial.

yes; a good action item for you, David.

We should move the java mapper text to an appendix.

> > 5.1. Named and optional parameters
> 
> does anyone use those in real life? if not then maybe its not worth
> being 
> in a basic tutorial.

Honestly, I forgot they that were there. But many of the science functions are getting pretty long arg lists and would benefit from this, so Im inclined to leave this in for the moment and see how real usage works out.

Lastly, back on the "type file" issue, I'd like to note:

Just defining file by default seems relatively simple.

It leads to the question of what we call the file reference type. And how it relates to "external". We left this issue dangling after some discussion last year.

There's a yet more complex discussion as to whether "file" should be an intrinsic type, and whether one would then say:

type textfile file;

And then consider:

type runflag boolean;
type status int;

Its best we defer anything complex in this area to a much later language summit, if and when we have the resources and user demand to consider the deeper type issues.
 
- Mike

> -- 
> http://www.hawaga.org.uk/ben/
> 
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user

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




More information about the Swift-user mailing list