rolivieri commented on issue #3: Initial Support for swift 4
URL: 
https://github.com/apache/incubator-openwhisk-runtime-swift/issues/3#issuecomment-345100414
 
 
   As @csantanapr mentioned in 
`https://github.com/apache/incubator-openwhisk-runtime-swift/issues/3#issue-271889325`
 and 
`https://github.com/apache/incubator-openwhisk-runtime-swift/issues/3#issuecomment-342535030`,
 I am also thinking we should first provide/release basic Swift 4 support in 
OpenWhisk. By basic, I mean allowing developers to implement functions using 
Swift 4 and use the same entry point (API) that exists today: a dictionary IN, 
a dictionary OUT. Doing so would allow developers migrate their existing 
actions to Swift 4 without too much effort (non-breaking API change).
   
   Then, as a separate and second release for Swift 4, we can introduce one or 
more new entry points (i.e. APIs) that Swift developers can leverage in 
addition to the basic dictionary IN, dictionary OUT. These new APIs will 
leverage the Codable protocol that is available now in Swift 4. For instance, 
one new API method could allow developers specify a Codable IN and a Codable 
OUT, and this Codable OUT object would be made available through a callback 
function, hence supporting async APIs out of the box (which more than likely 
will be the norm for fetching data from external resources during the execution 
of an action). @csantanapr and I spent time this past week prototyping how this 
could look like 
(`https://github.com/rolivieri/functions-swift/blob/master/Sources/Action/main.swift`).
   
   We are still getting user feedback from the community in regards to the new 
Codable APIs and we should spend more time looking at web actions and figure 
out what set of Codable APIs should be made available for Swift developers 
(regular and web actions). While we work on defining these APIs, we could (in 
parallel) now make available Swift 4 with the known, existing API: a dictionary 
IN, a dictionary OUT.
   
   To sum up, I am thinking we can use two stages/milestones for Swift 4: 1) 
Swift 4 support with existing API and 2) new set of APIs that leverage Codable.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to