What is the advantage of C?

  • Thread starter lovecreatesbea...
  • Start date
C

Christopher Benson-Manica

(WRT the definition of the word "precursor":)

Robert, I think this definition, which Rod took directly from
dictionary.com, is a pretty clear indication that his use of the word
"precursor" was correct, although of course had he used "predecessor"
we could have avoided yet another descent into semantic pedantry
concerning a language other than C.

(FWIW, I admit that I was surprised that Rod's use of the word was
appropriate.)
What do you think the phrases "and indicates the approach of someone or
something else", "and indicates, suggests, or announces someone or
something to come", and "and indicates the approach of another" mean
exactly?

"Precursor" certainly has those meanings, as well, but using it
without intending those meanings is correct, as far as dictionary.com
is concerned.
 
P

Paul Connolly

I don't think that's how the word is usually used.

Wittgenstein argued that words have uses - and they don't have meanings - in
his later work "Philosophical Investigations" - I have a lot of time for
that idea for the way the people use everyday language - his early work
"Tractatus Logico-Philosophicus" tried to put language on the same level as
mathematical logic (hahahhahah) - he gave up on that silly idea.
 
P

Paul Connolly

No. It doesn't imply any such thing. It simply means to precede which,
of
course, means that something followed. Here are definitions from three
dictionaries:

1. a person or thing that precedes, as in a job, a method, etc.;
predecessor.
2. a person, animal, or thing that goes before and indicates the approach
of
someone or something else

1. One that precedes and indicates, suggests, or announces someone or
something to come:...
2. One that precedes another; a forerunner or predecessor.

1 a : one that precedes and indicates the approach of another b :
PREDECESSOR
2 : a substance, cell, or cellular component from which another substance,
cell, or cellular component is formed

We cannot use words like expressions in mathematics or programming
languages:

How do dictionaries define a word?
Let's keep a list of the undefined words - add our first word (the one we
are looking up in the dictionary) to the list of undefined words - ok follow
each of the definitions of those words, and all the words that are used in
their definitions -
either
definitions are self referential (i.e. they refer to a word in our list of
undefined words)
or
they are defined in a number(>=1) of different words - let's add those
words to our list of undefined words - so the number of undefined words
increases by at least one
or
the word is not defined

Since the number of words in a dictionary is finite and, without self
reference the number of words involved in the definition of a word is
increasing, so there must eventually be some reference to an undefined word
in our list of undefined words, or a reference to a word that is not defined
in the dictionary.

so if you strive to find meaning in the dictionary definition of a word then
a word depends on its own meaning, or depends on a word that depends on its
own meaning, or it is depends on an undefined word.

either that of I've taken too much LSD.
 
P

Paul Connolly

CptDondo said:
OK, I can't resist.... Alan Turing didn't exist either... So ultimately
neither does C. (Ducking...)
surely, like all mathematics, it would have been invented* by someone
sometime - gayness is irrelevent to mathematical invention - given that, it
is hard to think of a straight man coming up with "Bohemian Rhapsody"

invented* - I don't go along with the Platonic idea of mathematics that the
truth-is-out-there to be discovered - mathematics is a construction of the
mind.
 
P

Paul Connolly

that isn't quite right you eejit Connolly - you need to keep a list of the
words that have been looked up, and the list of words that have not been
looked up - if a word hasn't been looked up then you can't assume
self-reference of definition just yet (you need to expand the definition of
the un-looked-up word first)
 
C

Charles Richmond

Keith said:
I don't see how specifying the representation of a null pointer would
shorten the standard significantly.

What *would* shorten the standard would be to drastically simplify the
concept of null pointer constants. Drop the stuff about special-case
conversion of an integer constant expression with value 0. Add a new
keyword, say "nil" or "null", and make it the *only* valid null
pointer constant. Don't bother specifying how null pointers are
represented. (This is basically what Pascal and Ada do. Programmers
in those languages don't care how null pointers are represented, only
that they compare equal to null pointers and unequal to non-null
pointers.)

This wouldn't shorten the standard by a whole lot, but it would
certainly shorten section 5 of the comp.lang.c FAQ.

Of course it's not possible to do this without breaking existing code,
so it will never happen.
The NULL pointer and exceptions associated therewith...were only an
example. My point is that the C standard is replete with exceptions
to allow strange systems to be standard. ISTM that this comprises
the bulk of the current C standard. I say simplify the standard and
let the strange, non-conforming implementations change to match it.
Old code that is broken...will be broken. It can work under K&R or
something. New code shoule match the standard.
 
C

Clever Monkey

Could you extract examples of the characteristics of C itself to
demonstrate what the advantages of C are? What are its pleasant,
expressive and versatile characteristics?

And what are its disadvantages?
In my case: job security.

Seriously. None of the new kids seem to know it anymore, so the
shrinking amount of C we have in our shop is pretty much mine to maintain.

Probably not the answer you wanted, but I'm pretty language agnostic. C
can make small, tight object code, and the source can be made
reasonably portable across a variety of platforms. Most of the warts
and problems are well known, so it is easy to avoid common gotchas.

One downside is that subtle bugs can lie in wait for years, ready to
ensnare the unwary.

C hacking is also very sexy, and C coders get all the chicks.
 
S

Skarmander

Malcolm said:
There probably is a way to tell a computer what to do, simply, clearly and
without any real possibility of error, but we haven't found it.

On the contrary: it is the computers who are simple, clear and without any
real possibility of error, so anything you tell them has to be likewise.
What we're looking for are the least obnoxious ways of adapting our
intuition to the algorithmic world. There's much room for improvement there,
but it is unlikely that it will ever become "simple".

The notion that it should be the other way around is what causes all the
trouble. It is not that computers aren't fit to implement human wishes, but
that humans aren't fit to utilise the computer's potential to do so. New
programming languages will not change that in and of themselves; at best
they allow for more compact expressions of known approaches.

S.
 
S

Skarmander

Malcolm said:
The most important advantage is that a C compiler exists for almost every
platform in existence. There is also a huge body of code.
It is about the "cleanest" of all the high level so-called second-generation
languages. It has enough syntax to make programs readable, but no more.

The main disadvantage is that there is no support for object-orientation.

No, the main disadvantage is that there is no support for functional
programming. Well, you have pointers, but no higher-order functions, so
that's useless.

Actually, its support for logic programming is pretty much nonexistent as
well. And have you tried scripting it? Hopeless.

In other words, it's between unfair and pointless to call C's lack of
alternate approaches to programming a disadvantage. Maybe in a few years (or
possibly decades) O-O will have faded away in favor of another paradigm;
will it then be C's disadvantage not to support that?

You could take C to task for its limited and clumsy support for modularity,
which is something O-O languages at least attempt to do better. That doesn't
mean "not being O-O" is itself a disadvantage, though.

S.
 
M

Malcolm

Charles Richmond said:
The NULL pointer and exceptions associated therewith...were only an
example. My point is that the C standard is replete with exceptions
to allow strange systems to be standard. ISTM that this comprises
the bulk of the current C standard. I say simplify the standard and
let the strange, non-conforming implementations change to match it.
Old code that is broken...will be broken. It can work under K&R or
something. New code shoule match the standard.
If you've got a strange system it is normally strange for a reason, not
because some evil engineer decided to mess ANSI up.
That reason is highly likely to be performance requirements. If null
pointers can't be all zero, likely either the hardware is very cheap and
needs zero as one of its 256 bytes of writeable memory, or is very expensive
and has some wonderful synchronous address validation system. Either way,
specifying extra operations to make all-zero null is effectively saying that
standard C cannot run on the machine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top