On Jul 5, 2016, at 5:41 PM, Saleem Abdulrasool <compn...@compnerd.org> wrote:
> On Tuesday, July 5, 2016, Chris Lattner <clatt...@apple.com 
> <mailto:clatt...@apple.com>> wrote:
> 
>> On Jul 5, 2016, at 5:28 PM, Saleem Abdulrasool <compn...@compnerd.org 
>> <javascript:_e(%7B%7D,'cvml','compn...@compnerd.org');>> wrote:
>> 
>> On Tuesday, July 5, 2016, Chris Lattner <clatt...@apple.com 
>> <javascript:_e(%7B%7D,'cvml','clatt...@apple.com');>> wrote:
>> 
>>> On Jul 5, 2016, at 2:59 PM, Brian Gesiak via swift-evolution 
>>> <swift-evolution@swift.org <>> wrote:
>>> 
>>> Sorry to resurrect such an old thread! I understand getting this in Swift 
>>> 3.0 might not be realistic anymore, but this is still something I’d love to 
>>> see added to Swift. Could someone advise on whether it still makes sense to 
>>> spend time on this proposal? Or is this part of Swift too solidified to 
>>> change at this point?
>>> 
>> It is definitely beyond Swift 3.0, but I’d love to see this happen at some 
>> point, we really need someone to drive the (surely to be contentious) design 
>> process.
>> 
>> I'm probably going to regret this, but given that I had originally proposed 
>> this to Brian and would really like to see this happen, what does this 
>> entail?
>>  
> 
> 1) get some consensus on list for an overall approach
> 2) formalize a proposal and submit a PR to swift-evolution
> 3) iterate
> 
> #1 is the hardest I think.  I don’t think a truly minimal wrapper of the 
> POSIX APIs is interesting, I think we should at least make a Swifty POSIX 
> API, which is portable and low-abstraction overhead.  However, it should fix 
> the mistakes of errno and “creat” among other things.
> 
> That sounds pretty reasonable.  Especially if we do this earlier, breaking 
> from expectations in terms of mapping for things like "creat" would be less 
> intrusive.
> 
> Not sure what you had in mind for errno.  It seems like if we have an SDK 
> overlay for posix, we could hide errno, handling it similar to NSError.  
> However, I think that violates the low overhead.

It seems that we should either go down the “typed result type” route, or 
implement support for typed throws (my personal preference), allowing us to say 
“func f() throws POSIXError {}”.

-Chris

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to