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

Re: [OT] Re: C++ *for Git*

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Sep 23, 2007, 13:42 UTC
Message-ID
<e5bfff550709230642v7fa5e837s7a5b9082b043672d@mail.gmail.com>
In-Reply-To
<20070923104525.GC7118@artemis.corp>
On 9/23/07, Pierre Habouzit <madcoder@debian.org> wrote:
Show 13 quoted lines
> >
> > Object oriented languages creates black boxes: that's the reason why
> > object oriented exsists and also the reason why Linus hates it ;-)
>
>   This is just nonsense. This has been proved, though I can't find the
> paper about this anymore, than modules (or packages whichever name you
> give them) plus abstract types are as good as OO languages at creating
> black boxes. I mean it has been proved that it gives the exact same
> amount of expressiveness. So please stop with this myth. And don't speak
> for people, I would be very surprised that Linus would dislike "black
> boxes". Abstractions are good, when used wisely, and I would be much
> surprised to see Linus pretend otherwise.
>
>From a Linus recent thread:
Show 11 quoted lines
> - inefficient abstracted programming models where two years down the road
>  you notice that some abstraction wasn't very efficient, but now all
>   your code depends on all the nice object models around it, and you
>   cannot fix it without rewriting your app.
>
>In other words, the only way to do good, efficient, and system-level and
>portable C++ ends up to limit yourself to all the things that are
>basically available in C. And limiting your project to C means that people
>don't screw that up, and also means that you get a lot of programmers that
>do actually understand low-level issues and don't screw things up with any
>idiotic "object model" crap.

Perhaps I have misunderstood, but the idea I got is that for Linus OO brings in more problems than what it tries to fix.

>   The real problem with big applications, is not that they are written
> with C, C++, D, APL or Perl, but that they are big.

I have said exactly this, I don't understand where's your point in repeating the same concept.

> C has many many quirks, I don't discuss that, but OO programming
> solves none of them, and the problems OO addresses are not the one that
> may interfere in the git development.

I really don't get how you made up your mind I'm advocating OO ? The only comment I made on OO until now was to highlight one of its downsides.

> I mean, the two really interesting
> things in OO (that haven't a tremendous cost in return) are member
> overloading and inheritance.
You have listed two things that are a world apart one from each other.

member overload is just syntactic sugar for name mangling, while inheritance and the _strictly_ related virtual member functions (AKA polymorphism) is what opens the gates to all the stuff you have deeply blamed in your post.

>I see very few places where git would
> benefit from that
Instead I see none. But probably you have looked at git code better then me.
>   Can we go back to git now ?
>
You are not forced to follow this thread if this bores you.

Thanks Marco

Previous: Pierre HabouzitNext: Nicolas Pitre
Message 18 of 34 in “C++ *for Git*”
  1. Dmitry KakurinSep 22, 2007
  2. David KastrupSep 22, 2007
  3. Johannes SchindelinSep 22, 2007
  4. Marco CostalbaSep 22, 2007
  5. Dmitry KakurinSep 23, 2007
  6. Kyle RoseSep 22, 2007
  7. Miles BaderSep 22, 2007
  8. [OT] Re: C++ *for Git*Kyle Rose, Sep 22, 2007
  9. David KastrupSep 22, 2007
  10. Alex UnleashedSep 22, 2007
  11. Frank LichtenheldSep 23, 2007
  12. David BrownSep 23, 2007
  13. David KastrupSep 23, 2007
  14. Marco CostalbaSep 23, 2007
  15. David KastrupSep 23, 2007
  16. Marco CostalbaSep 23, 2007
  17. Pierre HabouzitSep 23, 2007
  18. Marco CostalbaSep 23, 2007
  19. Nicolas PitreSep 23, 2007
  20. Marco CostalbaSep 23, 2007
  21. David KastrupSep 23, 2007
  22. Marco CostalbaSep 23, 2007
  23. Paul FranzSep 23, 2007
  24. Linus TorvaldsSep 23, 2007
  25. Marco CostalbaSep 23, 2007
  26. David KastrupSep 23, 2007
  27. Marco CostalbaSep 23, 2007
  28. David KastrupSep 23, 2007
  29. Dmitry PotapovSep 23, 2007
  30. David KastrupSep 23, 2007
  31. Robin RosenbergSep 23, 2007
  32. Reece DunnSep 23, 2007
  33. Dmitry PotapovSep 24, 2007
  34. Martin LanghoffSep 22, 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.