Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Walter Bright <boost@xxxxxxxxxxxxxxx> writes:

> There are a lot of people hard at work on D to make it more stable
> and increase the breadth and depth of tools available. I am fully
> aware that there may be non-technical issues to using D in a project
> like git, like availability of other D programmers, tradition, etc.,
> but in this thread I'm concerned mainly with technical issues.
>
> P.S. I'm also NOT suggesting that git be converted to D. Translating
> a working, debugged, 80,000 line codebase from one language to
> another is usually a fool's errand.

In my opinion there is basically one area which C has botched up
seriously in order to be useful as a general purpose language, and
that is conflating pointers and arrays, and allowing pointer
arithmetic.  The consequences are absolutely awful with regard to
compilers being able to optimize, and it is pretty much the primary
reason that Fortran is still quite in use for numerical work.

C has no usable two-dimensional (never mind higher dimensions) array
concept that would allow passing multidimensional arrays of
runtime-determined size into functions.  Period.

Add to that the pointer aliasing problems affecting compilers, and C
is useless for serious portable readable numerical work.

Fortran libraries like blas and lapack are ubiquitous after decades
because the language can deal with multiple-dimension arrays sensibly,
and could do so in the sixties already.

C99 helps a bit.  But messing around with restrict pointers and
similar means that to wring equal performance out of some trivial code
piece (or permitting the compiler to do so without having to take
aliasing into account) is a lot of work and leads to ugly and
inscrutable code.

That's the one thing that has seriously hampered C: the lack of a true
array type on its own, decoupled from pointers.  It does not need to
carry its dimensions with it or other
hide-the-implementation-from-the-programmer niceties: C is, after all,
a low-level language, and Fortran did not suffer from not having array
dimensions packed into the arrays as well.

But that's water down the drawbridge.  This single major deficiency is
not anything that would hamper git development.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux