[Swift-devel] Re: Adding associative array operators for Swift [GSoC]

Michael Wilde wilde at mcs.anl.gov
Tue Mar 29 14:34:28 CDT 2011


Hi Yadu,

To do the associative array project, you need to learn how Swift is compiled and Karajan, how it adds new Swift-specific runtime functions to Karajan (specifically the Swift-array access primitives) and how to extend those primitives to allow strings (minimally) and other data types (possibly) to be used as array indices.

You'll also need to modify the Swift grammar and parser (ANTLR) to accept non-integer array indices; and the Swift type checking system to extend the language's type conformation semantics.

Lastly you'll need to make sure the enhanced Swift still passes all its old language and runtime tests, and add new tests for the new syntax and semantics.

And I agree with you: it is certainly *possible* that an associative array construct, because of its key-value nature, would enable new models of map-reduce-like scripting patters to be implemented using Swift (but that remains to be developed and could probably be done in a variety of ways).

So this would be a nice first-phase project that could then lead to either the map-reduce project or further exploration of other language feature (e.g.: support for array slices was also recently requested...)

Regards,

Mike



----- Original Message -----
> Hi,
> 
> I see that "Adding associative array operators to Swift" has been
> added
> to the ideas page [1] (recently). I am interested in working on this
> project,
> and believe that this will allow further work on implementing
> map-reduce
> on Swift (as Mike Wilde had mentioned in a previous mail).
> 
> I have gone through most of the documentation on Swift and believe I
> have a fair understanding of the system. I have been doing research
> for the idea on adding functional iteration constructs to swift and I
> believe
> I have learnt a lot about swift from it.
> 
> Any ideas and suggestions would be greatly appreciated.
> 
> [1] http://dev.globus.org/wiki/Google_Summer_of_Code_2011_Ideas
> 
> --
> Thanks and Regards,
> Yadu Nand B

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




More information about the Swift-devel mailing list