D14353: Improve alignment of types

Roman Gilg noreply at phabricator.kde.org
Mon Jul 30 08:54:44 BST 2018


romangg added a comment.


  As already said on IRC and also how Vlad sees it: this optimization like for most of our classes is not worth it.
  
  Since we are an open source project, which strives to motivate people to contribute, good readability is much more important. So when ordering the class members we should think of our code as technical documents, whose structure should make it easy for new contributors to learn what the code is doing.
  
  This means that when describing a class general and more important properties should be at the top (e.g. here id, name, type) and more specific or less important ones are at the bottom (e.g. here rotation, scale). Also properties should be grouped if they show similarities (e.g. here pos, size, rotation, scale).
  
  If we have a class in our code where tighter packing really makes sense (much more instances), a comment in the class description should indicate this. Otherwise the default ordering mode should be better readability.

REPOSITORY
  R110 KScreen Library

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

To: gladhorn, #plasma, romangg
Cc: zzag, romangg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180730/10d4b839/attachment.html>


More information about the Plasma-devel mailing list