[Vm-dev] coding convention

Eliot Miranda eliot.miranda at gmail.com
Sat Jan 5 05:19:27 UTC 2019


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)
>

I loathe this.


> 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.

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.

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.

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190104/77d49861/attachment.html>


More information about the Vm-dev mailing list