[Differential] [Commented On] D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Wed Jan 18 14:26:18 UTC 2017


kossebau added a comment.


  > This is what we are using now and were using before. Seeing MyFlags(nullptr) may look odd at first, but it's totally fine.
  
  I agree that it is fine from a compiling POV. But from a human-reading-code POV having a nullptr (thus a pointer) being assigned to a bitflags type as value seems semantically non-sense and needs learning by everyone to accept this exception. More, for unknown variable types one might on first reading think those are pointer types, not flags.
  
  Being odd, being misguiding,  more letters to type and read... hm...
  
  So, is there an advantage of using `nullptr` over "0`? :)

REPOSITORY
  R280 Prison

REVISION DETAIL
  https://phabricator.kde.org/D3987

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kfunk, #frameworks, dfaure, kossebau
Cc: kossebau, dfaure, graesslin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170118/b35a67e7/attachment.html>


More information about the Kde-frameworks-devel mailing list