Google
  Web www.spinics.net

Re: question on API spelling

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


On Tue, Apr 03, 2012 at 03:41:12PM -0600, Eric Blake wrote:
> On 04/03/2012 03:10 AM, Martin Kletzander wrote:
> > On 04/03/2012 01:05 AM, Eric Blake wrote:
> >> We're quite inconsistent on US (canceled) vs. UK (cancelled) spelling in
> >> our public API:
> >>
> >> include/libvirt/libvirt.h.in:124:
> >> VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6,  /* returned from migration */
> >> include/libvirt/libvirt.h.in:125:    VIR_DOMAIN_RUNNING_SAVE_CANCELED =
> >> 7,   /* returned from failed save process */
> >> include/libvirt/libvirt.h.in:3220:    VIR_DOMAIN_JOB_CANCELLED = 5, /*
> >> Job was aborted, but isn't cleaned up */
> >> include/libvirt/virterror.h:247:
> >>    canceled/aborted by user */
> >> include/libvirt/virterror.h:248:    VIR_ERR_AUTH_CANCELLED = 79,
> >> /* authentication cancelled */
> >>
> >> Is it worth adding aliases so that a programmer can use consistent spelling?
> >>
> > 
> > I think it's worth it, because it looks pretty bad like this.
> > I just wonder if it could confuse someone, but that's probably too
> > paranoid idea :)
> 
> Do either of the Dan's have a strong opinion?  And if the consensus is
> indeed for a common spelling, do we favor US, favor UK, or provide
> aliases for all of these instances?  History-wise, we've been using
> CANCELED since commit d65a924 (May 2011), but CANCELLED in commits
> 7d575e0 (Mar 2010) and bb2eddc (Jan 2012).  My work on block job will be
> introducing another instance (the event for async block job
> cancelation), so it would be nice to know which way to spell my patch.

I prefer the Queens' English, but I couldn't tell you which is which :-P

Seriously though, I'd go with the majority usage, which is CANCELLED
by 2:1, and add an alias for the other one.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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


[Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net