[Vm-dev] coding convention

Alistair Grant akgrant0710 at gmail.com
Sat Jan 5 21:53:07 UTC 2019


Hi Eliot,

On Sat, 5 Jan 2019 at 06:19, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> On Fri, Jan 4, 2019 at 9:11 PM Ben Coman <btc at openinworld.com> wrote:
>>
>>
>> What is the preferred coding convention for function definitions...?
>> For example...
>>
>> ...
>>
>> static int
>> convertCopy(char *from, int fromLen, char *to, int toLen, int term)
>
> Yes please.  Being able to grep for function definitions bu searching for the name at beginning of line is very useful.  Yes, one can use project files to get more convenient searching than find and grep provide, but those are platform specific. If one really wants to search the entire code base across all platforms only find and grep work reliably.  And hence designing coding conventions for those tools, while apparently antiquated, makes solid sense in a complex cross-platform project, IMO & IME.

Thanks for explaining this.  I used to use the single line format, but
will switch to this now.


> I should perhaps write up the coding conventions I prefer, but in the absence of that, one that I really like is 4-space tabs.

I've made some changes to CONTRIBUTING.md, but am waiting to finish
testing my .appveyor.yml changes before submitting (tomorrow night
probably).


> What I would really like is a comprehensive list of editors people use and what conventions those editors support for specifying tab stops, if any.  We could then start adding those specifications to platform files and generated files alike.

I'm using gvim at the moment, but considering a shift to an IDE, maybe
Visual Studio (on linux)?  I'm happy to receive suggestions (it has to
be linux, though).

Cheers,
Alistair


More information about the Vm-dev mailing list