[Swift-devel] Standard Library Proposal/Discussion Page

Tim Armstrong tim.g.armstrong at gmail.com
Tue Jan 20 21:12:44 CST 2015


I made a bunch of comments.

I think my biggest concerns mainly revolved around the functions operating
on arrays in non-trivial ways - I'm not sure if the current definitions are
obvious/intuitive, or if it's possible to have obvious/intuitive
definitions given the weird behaviour of Swift arrays.

I sometimes feel like Swift arrays are having an identity crisis, so this
may be an opportunity to think through some of the issues.  Fundamentally
they're sparse arrays but they keep being pressed into service as dense
arrays.  Would simply adding a fixed-size dense array data type resolve
some of the complications?

- Tim

On Tue, Jan 20, 2015 at 8:56 PM, Mihael Hategan <hategan at mcs.anl.gov> wrote:

> I'm not sure. I think both.
>
> Let's try this: we use the wiki to mark points of contention. It gives
> us a quick overall view on the status. We discuss them through email and
> remove marks on the wiki as we develop fixes/agreements.
>
> I forgot to mention that there are going to have to be portions of the
> library that are specific to either T or K because that's just how some
> things have to be (e.g. file() in T). I don't think we should include
> them in this document/discussion. In other words, let's focus on the
> things for which there is no good reason to have different
> specifications in T and K.
>
> Mihael
>
> On Tue, 2015-01-20 at 20:36 -0600, Tim Armstrong wrote:
> > How should we discuss things?  Is it best to flag potential issues on the
> > wiki, or should I mention it in here?
> >
> > - Tim
> >
> > On Tue, Jan 20, 2015 at 6:56 PM, Mihael Hategan <hategan at mcs.anl.gov>
> wrote:
> >
> > > Hi,
> > >
> > > I made a wiki page on github where we could discuss the standard
> > > library: https://github.com/swift-lang/swift-k/wiki/StandardLibrary
> > >
> > > It's a draft and there are some rough edges. In particular:
> > >
> > > - regular expression support: substitutions can be done either directly
> > > or with a combination between a function that returns capture groups
> and
> > > a formatting function that replaces certain tokens with elements of an
> > > array. One could overload the format() function to, in addition to
> > > standard formatting specs, also support something like %s[index]. Or
> > > have a separate formatting function that only deals with this specific
> > > problem. I'm not sure.
> > >
> > > - some of the array functions may be difficult to implement as
> > > specified, or there may be different functions that solve the problems
> > > better. In particular when joining arrays of arrays, there is some
> > > freedom in how to order the elements of the resulting array.
> > >
> > > - read and write: it may not be easy to implement a read that can
> return
> > > any type in T. There is some precedent in other languages that support
> > > serialization for this.
> > >
> > > Anyway, I added red exclamation marks and red question marks where
> > > things aren't quite clear.
> > >
> > > I'm assuming that most of us will agree on most of the things. However,
> > > if you have a wildly different proposal, it might be wise to create
> > > another page instead of editing this one.
> > >
> > > Mihael
> > >
> > > _______________________________________________
> > > Swift-devel mailing list
> > > Swift-devel at ci.uchicago.edu
> > > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
> > >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20150120/dbe52628/attachment.html>


More information about the Swift-devel mailing list