msmtamburro edited a comment on pull request #1050:
URL: https://github.com/apache/cordova-ios/pull/1050#issuecomment-755438573


   > Does the addition of `NS_ASSUME_NONNULL_BEGIN` and `nullable` impact the 
public API for plugins that implement subclasses of CDVViewController and 
CDVWebViewEngineProtocol?
   > 
   > We need to be careful with public API to ensure (as much as possible) that 
we don't break existing plugins, otherwise people will just stay on older 
versions and keep opening issues requesting fixes be backported.
   
   Short answer, no impact. 
   
   Longer answer: Before the changes, the original code could actually return 
nil, but the consumer had no way to understand this without nullability 
specifiers.  The consumers likely assumed that these methods never return nil.  
Adding the `NS_ASSUME_NONNULL_BEGIN` is the equivalent of making no change to 
the nullability specifiers, however incorrect they may be.   Adding `nullable` 
to the new method tells the consumer to expect that this method can return 
null.  One could go through and update all of the previous methods with 
appropriate nullability specifiers at some point in the future.  (Worth noting: 
if I had not added the `NS_ASSUME_NONNULL_BEGIN`, I would have been required to 
add nullability specifiers everywhere in this file as soon as I added one to 
the new method.)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to