:: Re: [Dng] [OT] Debian problems with…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Hendrik Boom
Date:  
À: dng
Sujet: Re: [Dng] [OT] Debian problems with Jesse - was simple backgrounds
On Tue, Mar 03, 2015 at 05:36:54PM -0600, T.J. Duchene wrote:
> On Tue, 03 Mar 2015 12:46:17 +0100
> Didier Kryn <kryn@???> wrote:
>
> > I had
> > experiences of big programs in C and my experience is that debugging
> > is long (and probably never ended) and evolution is a nightmare.
>
> That can be true, but it is also true of any language, or of project of
> substantial size: say 2,000,000+ lines of code. It really depends on
> how well it was designed and documented.


I get this from a conference proceedings -- I forget which, but if
pressed I can probably get a specific reference within a few days. A
firm had an enterprise resource management system (at lease, that's what
I think it was called) that contained about 200,000 lines of C code.
Yes, that's an order of magnitude smaller thatn your example. They
decided that they needed a scripting language to simplify their work.
They picked Gambit Scheme for their scripting language, and they found
it quite effective. Gambit Scheme is an implementation of Scheme that
has a particularly intimate connection with C. It can be interpreted,
but it has a compatible compiler that compiles Scheme to C. Interfacing
Gambit to C is particularly easy.

As time passed, they kept finding new uses for their scripting
language. Occasionally they would realize and existing module needed
major new functinoality, and it was easier to write the new version in
Scheme than to modify the old.

Over two years or so, they ended up replacing their C code, piece by
piece, with Scheme code. In the end they had a system that was mostly
written in Scheme, was more reliable, did more, ran faster, and was only
about 30000 lines of Scheme.

It was really a win for the high-level, garbage-collected language.

Now I'll admit that not all problems are like that. But I suspect that
many are.

>
> It can be discussed
> > wether the choice makes sense, but I don't see even why C should
> > always be considered.
> >
> >
> Efficiency and guaranteed portability, Diedler. You can't say the same
> of Python, Perl, etc - because in order to use them, you have to
> compile them from C first.


Case study above, Scheme was clearly superior to C. Granted, Scheme
code did get compiled to C, but what I care about here is the code the
human programmers see.

-- hendrik