HI all,

a debate has recently taken place within the Objective-C/Swift dev community 
concerning the lack in Swift of something “equivalent” to Objective-C runtime 
programming. When using Swift exclusively, there seems to be no easy equivalent 
for Cocoa fundamental design patterns such as the Responder Chain, 
NSUndoManager, KVC/KVO/Bindings — and in general for code that leverages 
Objective-C's dynamic features (i.e., runtime programming). 

According to some developers, dynamic features in Ocjective-C grant easy coding 
and high decoupling and there are concerns that Swift might make harder a 
number of common Objective-C tasks (e.g., by increasing boilerplate code, 
lowering readability, making high use of switch, etc.) and eventually increase 
development time.

In this context, is interesting to know how those concerns are viewed within 
the Swift dev community and how they could be tackled. Thus, I would like to 
ask three questions that will be the base for an InfoQ article on the topic:


1.     Do you envision a more dynamic Swift? Should some level of dynamism be 
added at the language or framework level (e.g., to make dynamic dispatch or 
some form of message passing possible, while ruling out trickier features such 
as method swizzling and others) possible ? Should Swift be dynamic at all?

2.     What is the challenge of making a more dynamic Swift (or adding features 
to it to help solve the same kind of issues that are solved in ObjC through 
dynamism)? How could that be achieved without making Swift a less safe 
language? [e.g., reflection, macros, etc.]

3.     Are you aware of any work that has been/is being done in Swift 
development (Swift 3/Swift 4) to make Swift more capable of addressing the 
above mentioned concerns?


Thanks a lot in advance!
Sergio

—

Sergio De Simone
https://www.infoq.com/author/Sergio-De-Simone
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to