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

Re: Python extension commands in git - request for policy change

From
DLDavid Lang <david@lang.hm>
Date
Nov 25, 2012, 11:51 UTC
Message-ID
<alpine.DEB.2.02.1211250344360.32333@nftneq.ynat.uz>
In-Reply-To
<20121125105707.GA25212@thyrsus.com>
On Sun, 25 Nov 2012, Eric S. Raymond wrote:
Show 24 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu>:
>> There is, of course, the awkward issue of how/when to transition to
>> Python 3.x, which is *not* backwards compatible with Python 2.x.  I
>> expect that when the time comes there will be volunteers (myself
>> included) willing to help adapt Python scripts to the new version, but
>> the problem shouldn't be minimized.
>
> 2to3 actually does a pretty good job.  It doesn't reduce the
> transition cost to zero, but I find it does reduce that cost to an
> easily manageable level even on quite large codebases.
>
>> It would be insane to rewrite performance-critical C code in any
>> scripting language, but there is a huge penumbra of code that is not
>> performance critical and that mutates rapidly.
>
> Indeed.  In the git architecture there is a pretty clear dividing line -
> to a first approximation, plumbing should remain C but porcelain should
> probably not.  (Not that I am advocating forcing such a move - but it would
> be good to allow it to happen.)
>
> The 80-20 rule (80% of the execution time is spent in 20% of the code)
> helps us here.  The *other* 80% of the code can move to a scripting
> language with no significant performance loss.  To find out what needs
> to stay in C, run a profiler!

Remember that old code is tested code. The mere act of re-writing it from scratch is likely to introduce new bugs due to 'simplifications' by the person re-writing the code.

If a particular piece of code has a track record of being buggy, this may be overwelmed by the fresh start and new attention (plus whatever theoretical advantage any particular language provides), but unless it's suspect, re-writing it for the sole reason of changing the language is unlikely to be a win.

In addition, a good programmer working in a 'bad' language that they are very familiar with is going to write better code than that same programmer would write in a 'good' language that they are not familiar with.

I git, the programmers are very familiar with C and Bash, but far less familiar with either Perl or Python (although from what I see, far more familiar with Perl than Python)

If it's something going into contrib, where the core developers are not needing to maintain it, the language it's written in matters far less than if it's something that's going to be in the core. If it's in the core, it needs to be in a language that the core developers are comforatable with.

You may think that C and Bash are poor choices, but that is what the community is familar with.

You are far from the first person to say that git should be re-written (or at least large portions of it) in the language-of-the-day, and you won't be the last (even, or especially if it does get re-written in Python ;-)

David Lang
Previous: Eric S. RaymondNext: Stefano Lattarini
Message 31 of 82 in “Python extension commands in git - request for policy change”
  1. Eric S. RaymondNov 25, 2012
  2. Nguyen Thai Ngoc DuyNov 25, 2012
  3. Eric S. RaymondNov 25, 2012
  4. Felipe ContrerasNov 25, 2012
  5. Eric S. RaymondNov 25, 2012
  6. Felipe ContrerasNov 25, 2012
  7. Eric S. RaymondNov 25, 2012
  8. Felipe ContrerasNov 25, 2012
  9. Eric S. RaymondNov 25, 2012
  10. Felipe ContrerasNov 26, 2012
  11. David AguilarNov 27, 2012
  12. Felipe ContrerasNov 27, 2012
  13. Sitaram ChamartyNov 27, 2012
  14. David AguilarNov 27, 2012
  15. Guillaume DE BURENov 27, 2012
  16. Johannes SchindelinNov 27, 2012
  17. Felipe ContrerasNov 28, 2012
  18. Johannes SchindelinNov 25, 2012
  19. Pat ThoytsNov 25, 2012
  20. Eric S. RaymondNov 25, 2012
  21. Erik Faye-LundNov 25, 2012
  22. Felipe ContrerasNov 25, 2012
  23. Eric S. RaymondNov 25, 2012
  24. Felipe ContrerasNov 25, 2012
  25. Eric S. RaymondNov 25, 2012
  26. Felipe ContrerasNov 25, 2012
  27. Eric S. RaymondNov 25, 2012
  28. Andreas EricssonNov 26, 2012
  29. Michael HaggertyNov 25, 2012
  30. Eric S. RaymondNov 25, 2012
  31. David LangNov 25, 2012
  32. Stefano LattariniNov 25, 2012
  33. Eric S. RaymondNov 25, 2012
  34. Nguyen Thai Ngoc DuyNov 25, 2012
  35. Patrick DonnellyDec 11, 2012
  36. Sitaram ChamartyDec 12, 2012
  37. Patrick DonnellyDec 12, 2012
  38. Tomas CarneckyDec 12, 2012
  39. Nguyen Thai Ngoc DuyDec 12, 2012
  40. Tomas CarneckyDec 12, 2012
  41. Patrick DonnellyDec 12, 2012
  42. Joshua JensenDec 12, 2012
  43. Eric S. RaymondDec 12, 2012
  44. Joshua JensenDec 12, 2012
  45. Eric S. RaymondDec 12, 2012
  46. Jeff KingDec 12, 2012
  47. Patrick DonnellyDec 12, 2012
  48. Jeff KingDec 12, 2012
  49. Eric S. RaymondDec 12, 2012
  50. Jeff KingDec 12, 2012
  51. Junio C HamanoDec 12, 2012
  52. Andrew ArdillDec 12, 2012
  53. Junio C HamanoDec 12, 2012
  54. Patrick DonnellyDec 12, 2012
  55. Eric S. RaymondDec 12, 2012
  56. Patrick DonnellyDec 19, 2012
  57. Felipe ContrerasNov 25, 2012
  58. Eric S. RaymondNov 25, 2012
  59. Felipe ContrerasNov 25, 2012
  60. Eric S. RaymondNov 25, 2012
  61. Felipe ContrerasNov 26, 2012
  62. Magnus BäckNov 27, 2012
  63. Eric S. RaymondNov 27, 2012
  64. Sitaram ChamartyNov 27, 2012
  65. Felipe ContrerasNov 28, 2012
  66. Philippe VaucherDec 3, 2012
  67. Felipe ContrerasDec 4, 2012
  68. Stephen BashDec 4, 2012
  69. Felipe ContrerasNov 28, 2012
  70. Jeff KingNov 28, 2012
  71. Felipe ContrerasNov 28, 2012
  72. Jeff KingNov 28, 2012
  73. Felipe ContrerasNov 28, 2012
  74. Magnus BäckNov 28, 2012
  75. Joshua JensenNov 28, 2012
  76. Johannes SixtNov 25, 2012
  77. Eric S. RaymondNov 25, 2012
  78. Krzysztof MazurNov 25, 2012
  79. Eric S. RaymondNov 25, 2012
  80. Sitaram ChamartyNov 26, 2012
  81. Krzysztof MazurNov 26, 2012
  82. Martin LanghoffDec 4, 2012

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.