D15532: [Astyle] Add Objective C to list of languages with formatters
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Fri Sep 21 05:16:15 BST 2018
kossebau added inline comments.
> aaronpuchert wrote in astyle_plugin.cpp:36
> The advice is mostly important for exported symbols, see Ulrich Drepper: How To Write Shared Libraries <https://www.akkadia.org/drepper/dsohowto.pdf>, section 2.4. For `static` (internal linkage) variables the compiler knows all references to the variable, so it can remove the indirection and see that it is const (if it is).
> Nevertheless, it obviously doesn't hurt to get used to writing `char`, because sometimes it does matter.
> By the way, even more modern would be `static constexpr char`.
Not yet firm with constexpr myself, so curious to learn what would one gain from using `static constexpr char` here? What exactly would be buildtime evaluated?
I think I have seen constexpr already in KDevelop code, so if that is a better version, would be interested to improve all similar places.
To: rjvbb, #kdevelop, kossebau, kfunk
Cc: aaronpuchert, kfunk, pino, kossebau, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel