On 08/12/2021 20:05, Bart wrote:
> I post criticisms of quite a few languages I come across, although in
> this group it might be largely C and Algol68 that come up.
> C figures highly because I can't really get away from it; it's
> everywhere. It's also the one whose purpose and use-cases most closely
> match my own.
> But it also annoys me that it is so deified despite being a such a
> dreadful language.
This is where the communication problem lies - your annoyance is based
on two incorrect ideas.
First, you think C is "deified" - it is /not/. I really wish you could
understand that, as it would make discussions so much easier. You seem
to be fundamentally incapable of distinguishing between people who
understand C and use it (of which there are vast numbers), and people
who think C is the best language ever and completely flawless (of which
there are, to my knowledge, none).
Take me, as an example - because it's a lot easier to speak for myself
than for other people! I have a good understanding of the main C
language, and a subset of the standard library (there is a great deal in
it that I never use). I have read the standards, I keep up with changes
to the new standards. I have written a great deal of C code over the
years, almost all for small embedded systems (and a little for Linux).
I have used a wide range of C compilers for a wide range of
microcontrollers. Far and away the best C compiler I have seen is gcc,
which I know well and use for several targets.
I have worked in many different languages (I have at least some
experience with perhaps 20 programming languages, ranging from
functional programming, assembly, hardware description languages,
scripting languages, imperative languages, and more). I have used
assembly on a couple of dozen architectures over the years. I regularly
use several different languages for different types of programming.
I like programming in C. I think is a good language for a lot of what I
do, and I think it is a good language for a lot of what other people do.
But I also think it is /not/ an appropriate language for many uses
people make of it, and it is not an appropriate language for people who
are not able or willing to learn it properly. It is a language that
trusts the programmer to know what they are doing - if you are not
worthy of that trust, don't use C.
I would drop it in a heartbeat if I had something better. I /do/ drop
it without a backwards glance when I have something better for the task
at hand. Thus on some embedded systems, C++ is more appropriate and I
use that. (On occasions that are thankfully rare now, assembly was a
better choice.) On PC's or bigger systems, I often use Python - but
sometimes other languages.
C is not perfect. I have never heard anyone suggest it is - though you,
Bart, repeatedly accuse people (including me) of saying so. There are a
number of sub-optimal aspects in C that there is quite general agreement
about, and a large number where some people think it could have been
better, but different people have different opinions. For the most
part, those who know about the language understand why things are the
way they are - whether it be for historical reasons, compatibility,
limitations of old systems, or for more modern reasons and uses. No one
is in any doubt that if a language were being designed today to do the
job of C, many aspects would be different. No one is in any doubt that
C is not perfect for their needs or desires. Nonetheless, it is a good
language that works well for many programmers.
It takes effort, skill, knowledge and experience to use any language
well. You need to understand the subset that is appropriate for your
usage - all languages, bar a few niche or specialist ones, have features
and flexibility well outside what makes sense for any particular
programmer's needs. You need to understand how to use the tools for the
language as an aid to developing good code, avoiding problems, and
getting good results in the end. If you fight with the tools, you will
fail. If you fight with the language, you will lose. If you avoid the
useful features of the language, you will only make life harder for
yourself. If you are determined to find fault and dislike in every
aspect of a language, you will not like the language and you will not be
productive with it.
Your second mistake is to think C is a "dreadful language". It is not.
You place artificial limitations on it that make it a poorer language,
you misunderstand its philosophy and design, you fail to make good use
of proper tools (and C was always intended to be used with helpful
tools), and in general your emphasis is on finding faults rather than
uses. You appear unable to believe that people can successfully use the
There is certainly a place for criticism, especially constructive
criticism, in all languages - /none/ are anywhere close to being
universally perfect. But there is no benefit to anyone in a repetitive,
out of context and biased stream of abuse and negativity towards a
language (or anything else, for that matter).
> That is not surprising given when it was created, nearly 50 years ago.
> But it hasn't moved on. Its aficionados seem to treat every misfeature
> as an advantage.
I treat things I see in C as misfeatures, as misfeatures. So does
everyone else. I don't treat things /you/ see as misfeatures that way.
In reality, there are very few misfeatures in C that cannot be avoided
by good use of tools, good general development practices, and
occasionally a little extra effort. This is the same in all programming
languages, though of course the details vary. For some reason, you
insist on avoiding good tools (and avoiding good use of tools), and
prefer to find ways to misuse every feature of C that you can.
(The primary reason I have for moving to C++ is to gain additional
features, not to move away from misfeatures.)
>> I'd react
>> against anyone else deliberately and repeatedly writing nonsense about
>> other topics too.
> You mention lots of things you don't like about C. But it sounds like
> you don't have much of a choice about it; you have to rely on external
> tools to make it useful. That's OK, many people are stuck with languages
> they don't like.
I /do/ like C - I just don't think it is perfect (and certainly not
perfect for every task). And with good tools used well, it is a very
pleasant and effective language to work with. The same applies to any
good software developer with any language - you find a language that is
suitable for the task and fits your style, you find good tools that help
with the job, and development processes that work well. If you don't
have that, you won't like what you are doing and won't do it well. The
choice of programming language is irrelevant outside its suitability for
Perhaps you are just envious that I can happily and successfully work
with C, while you have failed? That would be a shame - I am happy, not
envious, that you have a language that you enjoy working with. And I
think it would be better if you avoided dealing with a language that you
clearly don't appreciate or enjoy.
> But some of us can do something about it, yet that seems to annoy you
> and you are constantly belittling people's efforts, especially mine.
People can choose whatever language they like, and use it as they want.
I don't belittle your effort or your language - I belittle your
attitude to your language and to C, your egotism and narcissistic
viewpoint. When you say you prefer to code in your own language, and
had success with it, that's fine. When you say your language is an
alternative to C, you are wrong. When you say it is "better" than C,
you are wrong. When you say a particular given aspect is "better" than
the equivalent aspect of C, then you /might/ be /subjectively/ right -
i.e., it could be better in some ways for some people or some use-cases.
(And I have regularly agreed on such points.)