kb 05.08.2011 14:18 Gajim

http://thread.gmane.org/gmane.comp.versi...
On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about portability,
> it's BS.

*YOU* are full of bullshit.

C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.

C++ leads to really really bad design choices. You invariably start using
the "nice" library features of the language like STL and Boost and other
total and utter crap, that may "help" you program, but causes:

- infinite amounts of pain when they don't work (and anybody who tells me
that STL and especially Boost are stable and portable is just so full
of BS that it's not even funny)

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

So I'm sorry, but for something like git, where efficiency was a primary
objective, the "advantages" of C++ is just a huge mistake. The fact that
we also piss off people who cannot see that is just a big additional
advantage.

If you want a VCS that is written in C++, go play with Monotone. Really.
They use a "real database". They use "nice object-oriented libraries".
They use "nice C++ abstractions". And quite frankly, as a result of all
these design decisions that sound so appealing to some CS people, the end
result is a horrible and unmaintainable mess.

But I'm sure you'd like it more than git.

Linus

Recommended by:

@werehuman: ПИШИ НА C++ @ БУДЬ ПРОТИВ ЛИНУСА

and @ulidtko, @gisty, @238328
1. ulidtko 05.08.2011 14:25 dedicated microblogging account

так значит, вот в чём секрет уберскорости гита.

2. werehumanulidtko /1 05.08.2011 14:27 Psi+

ты забыл <irony> или нет?

3. mvawerehuman /2 05.08.2011 14:27 N900

нет, не забыл :)

4. 0x2207ulidtko /1 05.08.2011 14:29 epsilon

по мне так hg быстрее git

5. werehuman0x2207 /4 05.08.2011 14:30 Psi+

по мне так они приблизительно одинаковы в скорости

6. 0x2207werehuman /5 05.08.2011 14:30 epsilon

только почему-то пакет с git занимает 35 мегабайт, а с mercurial только 4

7. werehuman0x2207 /6 05.08.2011 14:31 Psi+

всё остальное раскидано по /usr/lib/python2.6

8. 0x2207werehuman /7 05.08.2011 14:31 epsilon

т.е. git все остальное из /usr/lib/python2.6 возит с собой?

9. mva0x2207 /4 05.08.2011 14:31 N900

поздравляю

10. ulidtko0x2207 /6 05.08.2011 14:32 dedicated microblogging account

заканчивайте этот детский сад. Лучше снять шляпы и всем вместе погрустить о subversion.

11. werehuman0x2207 /8 05.08.2011 14:32 Psi+

git не берёт ничего из /usr/lib/python2.6. А то, что он юзает вместо этого — да, с собой.

12. 0x2207mva /9 05.08.2011 14:32 epsilon

спасибо. можешь отправить мне смс-ку

13. werehumanulidtko /10 05.08.2011 14:32 Psi+

погрустить и подкинуть ещё земельки

14. 0x2207werehuman /11 05.08.2011 14:33 epsilon

отлично. торвальдс на си написал сначала питон и потом на питоне написал гит. перемешать но не взбалтывать. ???. PROFIT

15. werehuman0x2207 /14 05.08.2011 14:33 Psi+

да ты же упорот

16. gisty0x2207 /14 05.08.2011 14:33 GajimB6677C2E

ШТО?

17. 0x2207werehuman /15 05.08.2011 14:34 epsilon

я нет. это торвальдс упорот

18. 0x2207gisty /16 05.08.2011 14:34 epsilon

не обращай внимания, у меня синдром вилфреда — мы с ним знакомы в реале

19. mva0x2207 /18 05.08.2011 14:48 N900

с торвальдсом?

20. 0x2207mva /19 05.08.2011 14:49 epsilon

с димой

21. mva0x2207 /20 05.08.2011 14:49 N900

медведевым?

22. 0x2207mva /21 05.08.2011 14:50 epsilon

кто это?

23. dorfe 05.08.2011 18:10

Линус всё правильно написал, боянище, да...

Do you really want to delete ?