<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 5 janv. 2019 à 06:19, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 4, 2019 at 9:11 PM Ben Coman <<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div dir="ltr"><div>What is the preferred coding convention for function definitions...?</div><div>For example...</div><div dir="ltr"><br><div>static int convertCopy(char *from, int fromLen, char *to, int toLen, int term)<br></div></div></div></div></blockquote><div><br></div><div>I loathe this.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><div>static int <br></div><div>convertCopy(char *from, int fromLen, char *to, int toLen, int term)<br></div></div></div></div></blockquote><div><br></div><div>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.</div></div><div><br></div></div></blockquote><div>Ah, thanks for fleshing those conventions with some meaning, it makes more sense :).<br></div><div>Of course, my O & E differs a bit.</div><div>Hovering other the text to see the definition, or just displaying a few lines in an embedded text editor will beat find/grep productivity by large.</div><div><br></div><div><div><img src="cid:ii_jqjapc6i0" alt="image.png" width="488" height="330"><br></div></div><div><br></div><div>I'm still using grep/find, but not for those trivial things that the IDE can do.</div><div>I'm also using the github search in web browser as a complementary tool.<br></div><div><br></div><div>Also the productivity of an IDE shines for inspecting the code starting from a (sub) list of compiler warnings!<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div>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.<div> <br></div></div></blockquote><div>4-space tabs is the default in many editors nowadays, but I recently saw platforms code depending on legacy 8-space tabs for correct alignment.</div><div>I love tab indent, tolerate space indents, hate tab in the middle of text, and hate the mixture of spaces and tabs indent. But I don't always notice, editors are too bright.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>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.</div><div><br></div></div></blockquote><div>I'm mostly using VisualStudio and Notepad++ on Windows, XCode on Mac. I'm still using vi or vim when I want well known regex power, or when working with the console.<br></div><div>They all support any tabs stop you like, can indent with tab or spaces etc... It's just a matter of taking time to configure them.<br></div><div>I try to respect the style of original author, but if it's too exotic (like 2 space indent on platforms/win32), and I'm to lazy to reconfigure my editor, I have to fight against it... For this reason, I would prefer to see more uniform conventions.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div><div dir="ltr" class="gmail-m_-5232912705792721257gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div>
</blockquote></div></div>