Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Monday 03 of December 2012, Michael Meeks wrote:
On Fri, 2012-11-30 at 18:53 +0100, Lubos Lunak wrote:
On Friday 30 of November 2012, Stephan Bergmann wrote:
I'm not sure this is a good move.

...

Which leaves us with the benefit of shorter, less visually cluttered
declarations of C++ functions.  But, as I argue above, I am not sure
that is an overall benefit at all.

      I'm convinced it is a benefit :-) - and it's interesting; there have
been a string of decisions in the past where we have decided to go for
more readable code over (IMHO) gross verbosity:

-     rtl::OUString( RTL_USTRING_VERYLONGNAME( "foo" ) )
+     "foo"

      to me is a -massive- improvement in readability. More minor ones are:

-     rtl::OUString
+     OUString

 You cannot compare these with exception specifications. The examples above, 
barring very corner cases, are only about readability and nothing else, while 
exception specifications are not. Arguing that we should remove exception 
specifications is more like arguing that we should remove all asserts.

      So - IMHO it would be -far- better to have a magic clang plugin to
build a database of what methods are called by what other methods, and
what signatures they have, and what exceptions they throw as the code
compiles - and post build to dump a list of offending methods: I suspect
we will have a lot of them to fix.

      Then leave that on on the tinderbox in perpetuity to enforce
cleanliness, allowing us to remove the signatures, make the code more
readable, and stop bothering about another set of constraints as we
write / review code :-) And of course, I'd love to write that plugin
myself if no-one beats me to it ;-)

 Sounds like an interesting project, mainly because it may turn out to be 
bloody difficult (consider e.g. calling something via a function pointer). 
But ok, I'll pass on that one myself :).

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.