After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680166 - CodingStyle: add rulez about multiple returned values
CodingStyle: add rulez about multiple returned values
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-07-18 12:42 UTC by Marc-Andre Lureau
Modified: 2016-03-31 14:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
CodingStyle: add rulez about multiple returned values (2.86 KB, patch)
2012-07-18 12:42 UTC, Marc-Andre Lureau
committed Details | Review

Description Marc-Andre Lureau 2012-07-18 12:42:26 UTC
Some proposal to spice up the day while Zeeshan is on holiday :)
Just kidding, we should try to convince him in GUADEC!

 * If a function returns several equally important values, they should
   all be given as out arguments. IOW, prefer this:

     void get_a_and_b (out string a, out string b)

   rather than the un-even, string get_a_and_b (out b)
Comment 1 Marc-Andre Lureau 2012-07-18 12:42:29 UTC
Created attachment 219095 [details] [review]
CodingStyle: add rulez about multiple returned values
Comment 2 Christophe Fergeau 2012-07-18 12:49:32 UTC
rule*Z* ? For what it's worth, I agree with what you suggest, this came up in a review some weeks ago.
Comment 3 Zeeshan Ali 2012-07-28 14:24:30 UTC
(In reply to comment #2)
> rule*Z* ? 

He was thinking about me, hence the 'Z'. :)

>For what it's worth, I agree with what you suggest, this came up in a
> review some weeks ago.

Yeah, I'm good with that.
Comment 4 Marc-Andre Lureau 2012-07-30 17:13:43 UTC
Attachment 219095 [details] pushed as d1a36c6 - CodingStyle: add rulez about multiple returned values