[Swift-devel] Standard Library Proposal/Discussion Page

Yadu Nand Babuji yadunand at uchicago.edu
Thu Jan 22 12:17:23 CST 2015


Hi Mihael,

I have a request for the some features similar to those provided by 
python's os library:

getcwd
remove    (/rm)
move ?    ( python doesn't seem to have this)
stat          ( For loops which stat for new files )
system     ( fix ? )

I've tried to get these through the system() function, but it would be nice
to have this done properly.

I also like the read/write functions in the I/O section. Saves writing a 
cat app.

Thanks,
Yadu

On 01/20/2015 06:56 PM, Mihael Hategan 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




More information about the Swift-devel mailing list