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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Walter Bright <boost@...>
Cc: <git@...>
Date: Friday, September 7, 2007 - 3:31 pm

Walter Bright <boost@digitalmars.com> writes:


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC] Convert builin-mailinfo.c to use The Better String..., Johannes Schindelin, (Fri Sep 7, 6:21 am)
Re: [RFC] Convert builin-mailinfo.c to use The Better String..., Johannes Schindelin, (Fri Sep 7, 6:56 am)
Re: [RFC] Convert builin-mailinfo.c to use The Better String..., David Kastrup, (Fri Sep 7, 3:31 pm)
Re: [RFC] Convert builin-mailinfo.c to use The Better String..., Johannes Schindelin, (Fri Sep 7, 6:26 am)
Re: [RFC] Convert builin-mailinfo.c to use The Better String..., Johannes Schindelin, (Fri Sep 7, 6:28 am)
Re: [RFC] Convert builin-mailinfo.c to use The Better String..., Johannes Schindelin, (Thu Sep 6, 8:08 am)