Open iDevelopper opened 3 years ago
Historical reasons, I guess? š
The library started as ObjC. Then I tried to re-implement it in Swift when it was introduced. Both projects are still being used, therefore both are still being maintained. Some people want ObjC only, others Swift only, and there are good reasons for both.
The sane thing would be to retire one of them, and just maintain one. Iāll probably do that at one point.
PS: Iām thinking about adding a SwiftUI implementation now. Maybe just as an āadd onā to the Swift version, but thatās a different discussion anyway...
First, I think we could expose the swift framework to Objective-C. What about this?
Using @objc
annotations? That seems like a good idea (I just hope weāre not overlooking some kind of obscure feature or optimization only available in Swift-only libraries). Feel free to open a pull request on AcknowList (or at least an Issue to call this out).
I don't understand why but it already works without using @objC annotations!
Interesting. Maybe because theyāre subclasses of Objective-C classes, so thereās some inherited compatibility?
But still, only the [[class alloc] init]
initializer is available. And objects like Acknow
and the parser are not available at all. So thereās still work to be done to have AcknowList really Objective-C compatible.
Exact, you are right! Ouf, because I did not understand! Not all functions need to be compatible? Do you need the parser to be public? Or internal?
Everything that is open/public in Swift should also be accessible from Objective-C, if we want it to be fully compatible.
I don't think so. We need to expose only the functions that a user will use in an Objective-C project.
I understand your point of view, but some developers will want to have access to everything that is already accessible in Swift, especially if we want to retire the Objective-C library later on.
Not an issue.
Are there any particular reasons for maintaining the two repos?
https://github.com/vtourraine/VTAcknowledgementsViewController
https://github.com/vtourraine/AcknowList