Re: [dev] Interesting post about X11

From: Aled Gest <himselfe_AT_gmail.com>
Date: Tue, 22 Jun 2010 18:27:18 +0100

>  * Because manual memory management is a mess.
>
>  * Because some data structures and algorithms (red-black trees, for a
>    classic example) are extremely cumbersome in C compared to other
>    languages.

Hiding complexity from a programmer does not improve the situation, it
simply removes the requirement of the programmer having to think about
what they're doing.

Every good programmer should understand what their code does at the
machine level, because that's what programing is about, instructing a
machine. Adding layers of abstraction that obfuscate what's really
happening is a bad thing imho.

>  * Because adding on to C to fix its many small warts would be a mess
>    (it can be less bad than C++ and still very bad).

Do you say that because of the syntactic structure of C, or because of
the way the standard is developed?

> Not all modern languages have to be towers of complexity: Scheme and SML
> are two very simple and elegant languages, and even Haskell 98 can
> really be kept in your head in its entirety.

I don't think any language _should_ be towers of complexity. But your
notion of elegance seems to be quite different from mine. Personally I
see code clarity as a component of elegance, and from a syntactic
perspective I've yet to see any faithful Lisp dialect that competes
with well structured C code.

I realize I may be throwing my self into a fire by bringing up
parenthesis hell, but I believe it's an important point. From a
practical standpoint, syntactic clarity is very important, and
syntactically Scheme, like Lisp, is a horrible mess by design.

I've seen people argue that aversion to over-use of parentheses is
simply psychological conditioning from using languages with a
different syntax, but I disagree. Over-use of any one symbol for
punctuation reduces the brain's ability to quickly and effortlessly
categorize distinct sequences within text.

Conversely I've seen people argue that the power of languages like
Scheme are such that it is possible to create an entirely different
language through meta-programing. While I have nothing against the
concept of meta-programing, I don't see the point in choosing a
language if for it to behave the way you want you must first mutate it
into an entirely different language.

Don't get me wrong, C is far from perfect and there are many ways I
believe it could be improved. For example:

- A powerful pre-processor that supports real scripting.
- Better support for implementing abstract data types.
- Greater context granularity.
- Support for generators and concurrent programming methods.
- Support for custom calling conventions.
- Standardized support for passing meta information such as 'type'.
- Support for stub functions that are guaranteed to be inlined.

I believe those features, if implemented properly, would give the
programmer greater power over what the code does, and provide greater
ease for implementing particular models, without adding an extra layer
of obfuscation.

Of course all this is simply my opinion, we're all free to choose
whatever programming language we wish to use. My point of contention
comes from Robert Ransom's suggestion that people *should* be using
Scheme for everything, without offering any practical reason for
people to change.

Regards,
Al Gest
Received on Tue Jun 22 2010 - 17:27:18 UTC

This archive was generated by hypermail 2.2.0 : Tue Jun 22 2010 - 17:36:02 UTC