git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Make gc a builtin.

From
APAndy Parkins <andyparkins@gmail.com>
Date
Mar 14, 2007, 11:48 UTC
Message-ID
<200703141148.12364.andyparkins@gmail.com>
In-Reply-To
<7vps7caxjb.fsf@assigned-by-dhcp.cox.net>
On Wednesday 2007 March 14 11:12, Junio C Hamano wrote:
> There is a difference between having a readily greppable and
> lessable copy handy to study at your own initiative, and being
> able to retrieve to review only after being told.
Well I was only joking really.
> You could argue that we can all do that with git-grep and
> git-less ;-).

Definitely. git is so good at this sort of stuff that encouraging the retention of commented out code is just filling up source files with junk.

In the old days, before version control, I would often have files with

#if 0 // This is how I used to do it // ... #endif

These days I comment it out, then after a few successful commits it gets removed from the source file. Git makes my code cleaner and clearer as it's not filled with obsolete junk. I am always secure in the knowledge that I can go back and look if I want. The same is true, I think, for shell script replaced with C code.

What will you do if in the future the C gets a feature that wasn't in the shell code - should the shell code be updated? If you don't then the comment is a lie, if you do then it's a maintenance nightmare.

Chuck it and be happy it's chucked. A rule for life. I should write fortune cookies.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Junio C HamanoNext: Johannes Schindelin
Message 9 of 10 in “Make gc a builtin.”
  1. Make gc a builtin.James Bowes, Mar 14, 2007
  2. Shawn O. PearceMar 14, 2007
  3. Junio C HamanoMar 14, 2007
  4. Theodore TsoMar 14, 2007
  5. Santi BéjarMar 14, 2007
  6. Junio C HamanoMar 14, 2007
  7. Andy ParkinsMar 14, 2007
  8. Junio C HamanoMar 14, 2007
  9. Andy ParkinsMar 14, 2007
  10. Johannes SchindelinMar 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.