[swift-evolution] Swift request list
vladgon at gmail.com
Sat Jun 4 13:34:39 CDT 2016
Dear swift team I would like to propose the following features to the Swift which could be easily added IMHO
Reflection support get/set proper by name, method invocation etc.
Option to get property name from variable could be useful for parsing JSON etc. e.g. self.lastName.dynamicPropertyName should be === “moduleName.Customer.lastName” as well as similar for methods
Option to mark the entire Class or section as dynamic vs single property/method
Proxy support for simple AOP at least method interception, Objective C has it so if Swift class is marked as Dynamic then it could support it as well
Annotations support @Service(...), @XYZ(...) with ability to use runtime reflection
Similar to Scala or swift Struct support for property declaration via init in classes e.g. init(firstName:String, lastName:String) should implicitly declare the above properties
This could be some overhead for iOs deployment if at all but since Swift is an open source now and could be potentially (most likely) used as the server side language those feature could be very helpful to support IOC, JSON parsing and serialization, logging, mocking etc..
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution