Re: refactory and file names

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

 



On 11/24/2015 07:38 PM, Marc-André Lureau wrote:


----- Original Message -----
On 11/24/2015 05:52 PM, Frediano Ziglio wrote:

Hi,

On Mon, 2015-11-23 at 12:44 -0500, Frediano Ziglio wrote:
Hi,
    as part of the refactory there are some file renames. Actually
the patches with files renames where removed if the file was already
present and all new files has already the new names.

The files should be (as the original changes) renamed like

red_parse_qxl.c -> red-parse-qxl.c
red_record_qxl.c -> red-record-qxl.c
red_replay_qxl.c -> red-replay-qxl.c
red_parse_qxl.h -> red-parse-qxl.h
red_record_qxl.h -> red-record-qxl.h
red_replay_qxl.h -> red-replay-qxl.h
reds_stream.c -> reds-stream.c
reds_stream.h -> reds-stream.h
red_worker.h -> red-worker.h
red_worker.c -> red-worker.c
lz4_encoder.c -> lz4-encoder.c
lz4_encoder.h -> lz4-encoder.h
red_dispatcher.c -> red-dispatcher.c
red_dispatcher.h -> red-dispatcher.h
red_channel.c -> red-channel.c
red_channel.h -> red-channel.h
red_common.h -> common.h
red_client_cache.h -> cache_item.tmpl.c

Also there are these patches
http://cgit.freedesktop.org/~fziglio/spice-server/commit/?h=refactory&id=d5ddf
4c9d36c9b9238f86079f8668d38d911f54c
http://cgit.freedesktop.org/~fziglio/spice-server/commit/?h=refactory&id=ac2f5
6d3faf64f0cb497c3245d2d997f235cdc87

Now... what's the rationale of these patches?

Prefer hyphen ('-') to underscore ('_') is surely one.
I am ok with both, but spice-gtk uses '-' so maybe for the consistency...
I
am
not sure if it is a strong enough argument.

I am ok with both, but would like justification.

Note that spice_style.pdf specifically mentions using
underscore ('_') for file names.

spice_style.pdf is outdated in many ways, and too large, so hard to grasp. Furthermore, it's not in tree, so people don't go there.

Compare in size with: http://git.qemu.org/?p=qemu.git;a=blob_plain;f=CODING_STYLE;hb=HEAD

It seems that gnome is using hyphen ('-').

And we are more and more align with gnome-style by using glib/gobject (however glib C-style is quite strange to me)

I dislike underscore in general, but it's indeed mostly by taste.

he point of renaming for me is to have consistency. We had a mix of hyphen and underscore over time (even projects like spice-protocol have never been spice_protocol for instance).

See also http://blog.codinghorror.com/of-spaces-underscores-and-dashes/: dash is usually better.

Alternatively we can rename spice-gtk files ;-)
Also I think it's a good idea to keep sw_canvas as sw_canvas
such that it's clear that other canvases are possible.

I don't follow, what meaning has the _ for you here?

I mean keeping "sw" as software-rendered canvas, compared to other
canvases we had/may-have (regardless of '_' vs '-' discussion).

Regards,
    Uri.


_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]