[Swift-devel] Standard Library Proposal/Discussion Page

Yadu Nand Babuji yadunand at uchicago.edu
Fri Jan 23 11:39:02 CST 2015


I was a bit confused about this because we have read() on the wiki, 
which can return
different results when invoked multiple times.

I agree with putting filesystem functions on hold instead of getting 
bogged down in
discussion limbo.

-Yadu

On 01/22/2015 10:42 PM, Mihael Hategan wrote:
> On Thu, 2015-01-22 at 16:04 -0800, Mihael Hategan wrote:
>
>> It is not clean, or at least I don't see how it can be made clean. In
>> particular because no function in swift should behave differently
>> depending on when it is run or if it is run multiple times. This is
>> called referential transparency and it says that all f(x) will always
>> have the same value when invoked with the same x. It is the only way I
>> know to guarantee that the not-fully-specified ordering of execution in
>> swift results in correct programs.
>>
> This does seem to fit into the idea of side effects contained into an
> app specification. That is, however, another issue I think.
>
> So I'm not sure. I would like to avoid contentious issues if possible.
> Otherwise we might spent too much time on this. Can we keep it to stuff
> that doesn't touch on filesystem manipulation and other known weird
> things?
>
> I think there are some functions on that page that are already tricky
> and should be removed, so, that's probably plenty for now.
>
> Mihael
>




More information about the Swift-devel mailing list