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

Michael Wilde wilde at mcs.anl.gov
Wed Mar 30 15:30:10 CDT 2011



----- Original Message -----
> Hi Mike,
> 
> Thanks for the detailed reply.
> 
> From what I understand an associative array implementation for swift
> would
> need Add key-value bindings and lookups based on keys. Modifying and
> removing
> the value associated with a key doesn't fit with the functional style
> and hence
> wouldn't be needed ?

Correct: associative arrays would act just like integer-indexed arrays: each array element is write-one and immutable.

> 
> This project certainly looks very interesting and hopefully I'll get
> to understand
> a sizeable portion of the codebase and contribute something meaningful
> to
> swift over this summer. I'm filing an application right away !

Great!

- Mike

> 
> On Wed, Mar 30, 2011 at 1:04 AM, Michael Wilde <wilde at mcs.anl.gov>
> wrote:
> > 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
> >
> >
> 
> Thanks and Regards,
> Yadu

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




More information about the Swift-devel mailing list