Re: [PATCH v2] Document preferred naming conventions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 03, 2017 at 17:47:23 +0000, Daniel P. Berrange wrote:
> This documents the preferred conventions for naming files,
> structs, enums, typedefs and functions.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
> 
> Changed in v2:
> 
>  - Fix typo
>  - Add macro docs
>  - Clarify that $VERB is always last in function/macro names

Hmm, so what do we do if there is an object, an action, and a subject?
Typically accessors which are designed to return some specific part of
the object. For example,

    virQEMUCapsGetDefaultMachine
    \         / | \            /
       object   |    subject
                |
                `- action (verb)

Are we supposed to name such function as virQEMUCapsDefaultMachineGet?
While it is certainly possible, it just doesn't read well.

Jirka

P.S. No nit-picking intended, I'm just trying to avoid future flames on
this matter.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux