git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Theodore Tso <tytso@mit.edu>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Petr Baudis <pasky@suse.cz>, Rocco Rutte <pdmef@gmx.net>,
	git@vger.kernel.org
Subject: Re: Libification project (SoC)
Date: Mon, 19 Mar 2007 09:28:00 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703190912190.6730@woody.linux-foundation.org> (raw)
In-Reply-To: <20070319025636.GE11371@thunk.org>



On Sun, 18 Mar 2007, Theodore Tso wrote:
> 
> Berkely got it horribly wrong when it tried to start with the "small
> and beautiful" functions that were non-reentrant, and we've been
> paying the price ever since.

I don't think that's a good argument, ESPECIALLY when coming from somebody 
from MIT.

Berkeley may have gotten it "horribly wrong", but the fact is, BSD kicked 
ass and took over the world, in a way that nothing comparable I know of 
from MIT ever did. Exactly *because* the BSD people didn't try to make it 
perfect, but made things "small and easy to *implement*".

(I would not say "small and beautiful". "Beauty" had nothing to do with 
it. "simple" had. And unlike beauty, simplicity really *is* more than skin 
deep, and is a fundamentally good design).

I'm a *huge* believer in "Worse is Better" (for people who don't know it, 
just google for that phrase, with the quotes around it).

In fact, I'd argue that the reason git kicks ass is exactly that "Worse is 
Better" design: you need to have a few conceptual (good) ideas to base 
your design off on, but given those good ideas, it's more important that 
things _work_well_in_practice_ than some "wouldn't it be better.." kind of 
mentality.

The "paying the price ever since" argument is bogus. If you get to that 
point, you've by definition *already*won*! 

Here's the real world according to Linus:
 1) everybody makes mistakes
 2) only the winners "pay the price" of those mistakes ever since, since 
    the losers will not be around to pay it, and the winners will have 
    made mistakes too (see #1)
 3) the more complex and subtle you make the interfaces, the more mistakes 
    you'll make, AND the less likely you are to be a winner anyway, since 
    you'll have problems implementing it *and* it will probably be subtle 
    to use too!

So the motto should always be: "Just Do It!", and screw worrying about 
paying the price. You *want* to have to pay the price. It's the best thing 
that can ever happen to you. And you want to have to start paying the 
price as early as possible - because that not only means that you won, it 
also means that you'll now be learning from your mistakes instead of 
trying to anticipate them, and I will *guarantee* that learnign from 
mistakes is going to be a lot more productive than trying to worry about 
them up-front.

> Do we really want to support two versions of the API forever?

I'd personally strongly vote for a "simple library" interface as a first 
cut.

And yes, if that means supporting two versions, I think it's better. You 
can easily have "libgit-simple.a" for trivial non-threaded accesses with 
out-of-memory conditions causing the process to die. That really *is* a 
very useful schenario, as shown by the fact that *every*single*core*git 
program has been happy with it.

Claiming that you need a complicated interface in the face of the *proof* 
that git itself dosn't need that complicated an interface is to me a bit 
disingenious.

Yes, *some* people will want a thread-safe one. But we're not talking 
something like libc here, where the library is so fundamental that it 
needs to be acceptable for everybody. It's perfectly possible to have a 
"libgit-simple.a" that is good for 99% of all uses, and that is simple to 
use, and less bug-prone simply because is is *simpler* (not just for 
users, but as an implementation).

And then for the small small minority of programs that want something 
fancier, do a "libgit-complicated.a" library. IF you ever get it working 
and complete, you can always then implement "libgit-simple" in terms of 
the complicated version.



  Is it 
> really that hard to support a reentrant API from the beginning?  I'd 
> submit the answer to these two questions are no, and no, respectively.
> 
> 						- Ted
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  parent reply	other threads:[~2007-03-19 16:28 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16  4:24 Libification project (SoC) Luiz Fernando N. Capitulino
2007-03-16  4:59 ` Shawn O. Pearce
2007-03-16  5:30   ` Junio C Hamano
2007-03-16  6:00     ` Shawn O. Pearce
2007-03-16  6:54       ` Junio C Hamano
2007-03-16 11:54         ` Johannes Schindelin
2007-03-16 13:09           ` Rocco Rutte
2007-03-16 15:12             ` Johannes Schindelin
2007-03-16 15:55               ` Nicolas Pitre
2007-03-16 16:13                 ` Johannes Schindelin
2007-03-16 16:26                   ` Nicolas Pitre
2007-03-16 18:22                     ` Steve Frécinaux
2007-03-16 18:53                       ` Nicolas Pitre
2007-03-18 13:57                         ` Petr Baudis
2007-03-16 23:26                     ` Johannes Schindelin
2007-03-16 16:17                 ` Shawn O. Pearce
2007-03-16 18:20               ` Marco Costalba
2007-03-16 18:38                 ` Marco Costalba
2007-03-16 18:59                   ` Nicolas Pitre
2007-03-16 21:07                     ` Marco Costalba
2007-03-16 23:24                       ` Johannes Schindelin
2007-03-17  7:04                         ` Marco Costalba
2007-03-17 17:29                           ` Johannes Schindelin
2007-03-16 19:09                   ` Andy Parkins
2007-03-18 14:08               ` Petr Baudis
2007-03-18 23:48                 ` Johannes Schindelin
2007-03-19  1:21                   ` Petr Baudis
2007-03-19  1:43                     ` Johannes Schindelin
2007-03-19  2:56                       ` Theodore Tso
2007-03-19  3:55                         ` Shawn O. Pearce
2007-03-19 14:57                         ` Johannes Schindelin
2007-03-19 16:28                         ` Linus Torvalds [this message]
2007-03-19 16:32                           ` Linus Torvalds
2007-03-21 11:17                           ` Andreas Ericsson
2007-03-21 17:24                             ` Linus Torvalds
2007-03-22  9:51                               ` Andreas Ericsson
2007-03-19  7:01                       ` Marco Costalba
2007-03-19  9:46                         ` Steve Frécinaux
2007-03-19 10:33                         ` Steve Frécinaux
2007-03-19 12:37                         ` Johannes Schindelin
2007-03-19 12:52                           ` Petr Baudis
2007-03-19 13:55                             ` Johannes Schindelin
2007-03-19 13:04                           ` Marco Costalba
2007-03-16 12:53     ` Petr Baudis
2007-03-16 13:47     ` Luiz Fernando N. Capitulino
2007-03-16 14:08       ` Petr Baudis
2007-03-16 18:38         ` Luiz Fernando N. Capitulino
2007-03-16 23:16           ` Shawn O. Pearce
2007-03-17 19:58             ` Luiz Fernando N. Capitulino
2007-03-18  5:23               ` Shawn O. Pearce
2007-03-18  5:52                 ` Junio C Hamano
2007-03-18 16:18                   ` Luiz Fernando N. Capitulino
2007-03-18 19:31                     ` Junio C Hamano
2007-03-19 16:09                       ` Luiz Fernando N. Capitulino
2007-03-18 21:15                     ` Nicolas Pitre
2007-03-16 15:16       ` Johannes Schindelin
2007-03-16  8:06   ` Johannes Sixt
2007-03-16  8:58     ` Matthieu Moy
2007-03-16 11:51       ` Johannes Schindelin
2007-03-16 12:55   ` Petr Baudis
2007-03-17  2:24 ` Jakub Narebski
2007-03-17  5:22   ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0703190912190.6730@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    --cc=pdmef@gmx.net \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).