comp.lang.c - 25 new messages in 7 topics - digest
comp.lang.c
http://groups.google.com/group/comp.lang.c?hl=en
Today's topics:
* Scope of a variable declared in for loop - 6 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/1092f2f493d747d0?hl=en
* usage of size_t - 5 messages, 5 authors
http://groups.google.com/group/comp.lang.c/t/19e0ad96d01b9898?hl=en
* Efficency and the standard library - 8 messages, 4 authors
http://groups.google.com/group/comp.lang.c/t/ad9fea19f2f7dd61?hl=en
* C99 is widely used! - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/0ba05b02a32efc0a?hl=en
* Experiment: functional concepts in C - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/7889fc59043eb32b?hl=en
* Any exit status without explicitely using return /exit - 1 messages, 1
author
http://groups.google.com/group/comp.lang.c/t/6e91ccafedde0c25?hl=en
* Ask for book for efficient coding in C - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/1b697accaac68aeb?hl=en
==============================================================================
TOPIC: Scope of a variable declared in for loop
http://groups.google.com/group/comp.lang.c/t/1092f2f493d747d0?hl=en
==============================================================================
== 1 of 6 ==
Date: Wed, Feb 24 2010 8:25 am
From: Keith Thompson
Richard Heathfield <rjh@see.sig.invalid> writes:
> jacob navia wrote:
>> Keith Thompson a écrit :
>>> Michael Tsang <miklcct@gmail.com> writes:
>>>> Kenny McCormack wrote:
>>> [the usual]
>>>> C99 is not C?! READ THE STANDARD!
>>>> According to the standard:
>>> [snip]
>>>
>>> Don't worry about what Kenny says. He's lying.
>>>
>> Don't worry about Thomson, he is just obsolete.
>> He thinks anybody that doesn't agree with the C89 clique here
>> is lying...
>
> It would be lame to flame you for your spelling error, but it is
> common courtesy to get people's names right even if the rest of your
> spelling is shot all to pieces.
>
> To call Keith Thompson "obsolete" is to introduce a belligerent tone
> into what ought to be a technical issue.
To be fair, I introduced a belligerent tone myself when I called Kenny
a liar.
Though this doesn't justify jacob's latest insult against me.
[...]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
== 2 of 6 ==
Date: Wed, Feb 24 2010 8:30 am
From: Ben Bacarisse
Nick Keighley <nick_keighley_nospam@hotmail.com> writes:
> On 24 Feb, 12:16, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
>> ... It's off topic so I won't give you all the
>> quotations but C++ permits a declaration in the condition part of an
>> 'if', 'while', 'for' or 'switch' (but not 'do' of course).
>
> ah, thanks. How recent is that?
It's not in The Annotated Reference Manual of 1990 but it is in the
C++ 1998 standard.
--
Ben.
== 3 of 6 ==
Date: Wed, Feb 24 2010 8:30 am
From: Keith Thompson
Nick Keighley <nick_keighley_nospam@hotmail.com> writes:
> On 24 Feb, 12:16, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
>> Nick Keighley <nick_keighley_nos...@hotmail.com> writes:
>> > On 23 Feb, 16:00, Malcolm McLean <malcolm.mcle...@btinternet.com>
>> > wrote:
>> >> On Feb 23, 3:35 pm, vaysagekv <kvvays...@gmail.com> wrote:
>> <snip>
>> >> > B)if there is a for loop like below
>>
>> >> > for(int i=0;int c = getchar();i++);
>> <snip>
>> >> Also some
>> >> people use C++ as what is to all intents and purposes a C compiler
>> >> with a few differences,
>>
>> > I'm not sure what this is supposed to mean. C99 and C++ have identical
>> > behaviour as regards defining variables in for loops.
>>
>> >>one being that C++ always allows variables to
>> >> be declared anywhere.
>>
>> > well, no. C++ doesn't support option B) either.
>>
>> Sorry but it does. It's off topic so I won't give you all the
>> quotations but C++ permits a declaration in the condition part of an
>> 'if', 'while', 'for' or 'switch' (but not 'do' of course).
>
> ah, thanks. How recent is that?
Stroustrup mentions declarations in conditions in the 1994 edition of
"The Design and Evolution of C++". It's probably also in the 2nd
edition of The C++ Programming Language, but I don't have my copy
handy.
ObC: C99 picked up declarations in for statements (with the better
scoping rule that C++ eventually adopted), but not declarations in
conditions.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
== 4 of 6 ==
Date: Wed, Feb 24 2010 8:32 am
From: Keith Thompson
jacob navia <jacob@nospam.org> writes:
> gwowen a écrit :
>> TI's compiler for their Piccolo DSP does not support that extension.
>
> The "Piccolo dsp" is not a stand alone processor and must be used with an
> ARM7 processor, a product line introduced in 1992, 7 YEARS BEFORE the C
> standard was out in 1999. We see here the bad faith of this people when
> complaining about C99.
jacob, if someone disagrees with you, please stop for just a moment
and consider the possibility that they might not be deliberately
lying.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
== 5 of 6 ==
Date: Wed, Feb 24 2010 9:03 am
From: Malcolm McLean
On Feb 24, 6:14 pm, jacob navia <ja...@nospam.org> wrote:
> Richard Heathfield a écrit :
>
> > To call Keith Thompson "obsolete" is to introduce a belligerent tone
> > into what ought to be a technical issue.
>
> Yes. C89 is obsolete and Thompson with it.
>
My MPI compiler, back in the days when I had a parallel machine, threw
out slash slash comments.
== 6 of 6 ==
Date: Wed, Feb 24 2010 9:10 am
From: Keith Thompson
jacob navia <jacob@nospam.org> writes:
[...]
> What a sin! Misspelling thompson's name...
My name is spelled with a capital 'T'. I have consistently
respected the way you prefer to spell your own name. Please return
the courtesy.
[snip]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
==============================================================================
TOPIC: usage of size_t
http://groups.google.com/group/comp.lang.c/t/19e0ad96d01b9898?hl=en
==============================================================================
== 1 of 5 ==
Date: Wed, Feb 24 2010 8:31 am
From: Richard Heathfield
spinoza1111 wrote:
> On Feb 24, 6:49 am, Seebs <usenet-nos...@seebs.net> wrote:
>> On 2010-02-23, Richard Bos <ralt...@xs4all.nl> wrote:
>>
>>> And yet, I would prefer a novel written in English for literate readers
>>> _not_ to eschew idioms. You should compare C to a Shaw play or a book by
>>> Joyce. Do not write C as if you are Dr. Seuss - that's what BASIC is
>>> for.
>> I have to take some exception to this, because Dr. Seuss was actually an
>> extremely skilled writer of English, even though many of his books don't
>> make this obvious to casual observation.
>>
>> ... But the point is still valid. Idiomatic writing is used because it is
>> clearer and more communicative, and yes, that does impose the cost of learning
>> the idioms on the reader. It's still worth it.
>
> But whose idioms shall we use? Hint: I wouldn't use yours, since you
> simply don't appear to be a qualified programmer.
You appear to misunderstand (but see below) the nature of idioms. By the
time they are sufficiently popular to have /become/ idioms, their origin
is almost certainly lost in the mists of time. Not necessarily the case,
of course. I imagine that while(*s++=*t++); is probably straight out of
dmr's head. But even with that obvious example, I'm not sure.
But if you simply mean that you won't choose the same idioms that Seebs
chooses, that's plain dumb. It's like saying you'll refuse to take a bus
to work because there's a guy you don't trust, working for a completely
different company in a completely different country, who takes the bus
to work, so clearly it must be a bad choice. If that's your position,
it's idiotic.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 2 of 5 ==
Date: Wed, Feb 24 2010 8:41 am
From: spinoza1111
On Feb 24, 10:16 pm, Kelsey Bjarnason <kbjarna...@gmail.com> wrote:
> [snips]
>
> On Wed, 24 Feb 2010 01:46:27 -0800, Nick Keighley wrote:
> > count = count + 1;
>
> > is not obscure code.
>
> When the construct used in virtually every piece of C code one runs
> across reads "count++", where "count++" is such a common idiom that
> avoiding its use suggests there is some reason (either neophyte status,
> or something less obvious) for doing so, then yes, lacking comments
> explaining precisely _why_ such a screwball construct is being used, the
> result _is_ obscure code.
>
> Without additional explanation (eg "Imported from MatLab, which uses this
> sort of construct") there is no readily apparent reason for using such a
> construct. If we assume the coder is not a neophyte, it then follows he
> is using this screwball notation for a specific purpose, which implies
> there is some behaviour involved which shows up in "count = count + 1"
> but _does not_ show up in "count++".
>
> Which means now we have do scratch our heads, go running for the standard
> (and the compiler documentation), check "count" to see if there's some
> special magic associated with it, and try to figure out _what_ the
> different behaviour is that's being relied upon.
>
> When the search fails (assuming it does, i.e. we find no special magic)
> we're left not with confidence the construct works as we'd expect, but
> rather the uneasy feeling it is relying on some bizarre behaviour, quite
> possibly of an implementation-specific optimizer, or some equivalent,
> which we'll never be able to fully understand, let alone rely upon. The
> code, as a result, simply cannot be trusted.
>
> There are languages in which "count = count + 1" are common idiom. To
> people used to those languages, such a construct may be clear and
> concise. C is not one of those languages.
>
> Indeed, the very fact this has engendered a discussion as involved as
> this should be sufficient to show that such constructs are _not_ trusted
> by C coders, but _are_ treated as flags suggesting extreme review is
> warranted.
Actually, there are good reasons for dropping all use of pre and post
increment in favor of normal expressions:
* C "standardization" has considerably messed up the evaluation order
of these constructs: in a striking reversal of the intentions of most
standardization efforts, the standards geeks have gravely pronounced
that its evaluation order is Heisenbergian uncertain
* They only apply to lValues which makes them non-orthogonal to most
other operators
* A modern compiler will generate the same code for count++ as for
count = count + 1
* A modern optimizing compiler will override the scheduling that the
programmer attempts in if (a++) foo, compiling this and "if (a) foo; a
= a+1" in the same optimized way.
The problem is what "technological anthropologist" Diane Vaughan calls
"normalized deviance". She developed this anthropological construct to
explain why an all-male team at NASA subcontractor was pressured to
approve the January 1986 launch of the Challenger Space Shuttle (the
"teacher in space" mission which exploded shortly after leaving the
launch pad).
Vaughan, the author of "The Challenger Launch Decision" (Univ of Chi
1999) realized that in male workgroups, a "macho" attitude causes
technical men to decide collectively to abandon good practice and to
mistreat dissidents.
This phenomenon seems to me well advanced in C. C was developed in a
deviant fashion: an adolescent prank intended to show the "grownups"
of the Multics (PL/I based) project that bearded hippy weirdos could
program better than grey flannel suits. For this reason, and because
Kernighan and Pike had no visible way of demonstrating their
superiority except by an easily measured development time, C was from
the start a mishmash of ill-digested notions.
These included the preprocessor, a macro facility developed when the
serious problems of such processing were becoming evident in macro
assemblers: the pre and post increment operators which were (I
believe) merely implemented to use attractive machine instructions:
and above all, the unspeakably amateurish choice of Nul to terminate
strings, which permanently deprived a common and useful character of
membership in strings.
The psychology was adolescent in contrast to the mature and adult
effort to develop Algol on the part of serious scientists, and it was
funded solely by the monopolistic market failure that was the Bell
system of the time.
However, the fact that Kernighan and Pike got away with this nonsense,
and the even bigger nonsense of unix, normalized deviance into mythos.
The real contributions to the advance of software of a slightly older
generation were stolen by irresponsible adolescents and today, this
has created the sort of antics that occur on this newsgroup, including
Seebach's resentment-based analysis of code, and his substitution of
personal hatred for science.
== 3 of 5 ==
Date: Wed, Feb 24 2010 9:00 am
From: Malcolm McLean
On Feb 24, 6:41 pm, spinoza1111 <spinoza1...@yahoo.com> wrote:
>
> Actually, there are good reasons for dropping all use of pre and post
> increment in favor of normal expressions:
>
> * A modern compiler will generate the same code for count++ as for
> count = count + 1
>
That's a good reason for dropping the special operators.
However count = count + 1 is a construct needed so frequently that it
helps to have a special syntax for it.
In my idiom x = x + 1 and x++ are not equivalent. x++ is increemnting,
x = x+1 is adding a constant which, coincidentally, is unity.
An example is scores for matches in association football. The old rule
was 2 points for a win, one for a draw, zero for a loss. Now the rule
is 3 points for a win, one for a draw, zero for a loss. However they
could easily decide that the win premium is too great and make it five
for a win, three for a draw. Using the ++ operator to increment the
total for a draw wuld be inappropriate.
== 4 of 5 ==
Date: Wed, Feb 24 2010 9:16 am
From: raltbos@xs4all.nl (Richard Bos)
Keith Thompson <kst-u@mib.org> wrote:
> raltbos@xs4all.nl (Richard Bos) writes:
> [...]
> > ...because this is nonsense. There have been _many_ situations in which
> > sizeof(void *) != sizeof (size_t) != sizeof (int).
>
> I don't think I've ever used a system where sizeof(void*) != sizeof(size_t).
Yes, but you are on record as never having had to contend with tiny,
small, medium, compact, large and huge memory models. Things could
get... interesting.
Richard
== 5 of 5 ==
Date: Wed, Feb 24 2010 9:44 am
From: "Ed Vogel"
"Ersek, Laszlo" <lacos@ludens.elte.hu> wrote in message
news:TfnzfiP9zzx4@ludens...
> In article <Xt8Bokvz0a6x@ludens>, lacos@ludens.elte.hu (Ersek, Laszlo)
> writes:
> So you worked on *the* C compiler for OpenVMS, then; I notice.
>
For *many* years.
Ed Vogel
==============================================================================
TOPIC: Efficency and the standard library
http://groups.google.com/group/comp.lang.c/t/ad9fea19f2f7dd61?hl=en
==============================================================================
== 1 of 8 ==
Date: Wed, Feb 24 2010 8:38 am
From: Tim Streater
On 24/02/2010 14:49, spinoza1111 wrote:
> On Feb 24, 11:07 am, Richard Heathfield<r...@see.sig.invalid> wrote:
>> Peter Nilsson wrote:
>>> Richard Heathfield<r...@see.sig.invalid> wrote:
>>>> That's an easy one. It's because he's an idiot.
>>
>>> Is that considered to constitute a promising technical
>>> argument (sic)?
>>
>> Not in the slightest. :-)
>
> Fuck you, asshole. These newsgroups are not set up so that you and
> Seebach can harass and label their contributors. If you can't behave,
> leave.
>
> And fuck you very much indeed, for I regard profanity as a far lesser
> evil than the deliberate destruction of reputations in which you
> engage, while claiming to defend Holy Fucking C, a piece of shit on
> its last legs.
Mmm, yes. *Definitely* better social skills.
--
Tim
"That the freedom of speech and debates or proceedings in Parliament
ought not to be impeached or questioned in any court or place out of
Parliament"
Bill of Rights 1689
== 2 of 8 ==
Date: Wed, Feb 24 2010 8:57 am
From: spinoza1111
On Feb 25, 12:38 am, Tim Streater <timstrea...@waitrose.com> wrote:
> On 24/02/2010 14:49,spinoza1111wrote:
>
>
>
>
>
> > On Feb 24, 11:07 am, Richard Heathfield<r...@see.sig.invalid> wrote:
> >> Peter Nilsson wrote:
> >>> Richard Heathfield<r...@see.sig.invalid> wrote:
> >>>> That's an easy one. It's because he's an idiot.
>
> >>> Is that considered to constitute a promising technical
> >>> argument (sic)?
>
> >> Not in the slightest. :-)
>
> > Fuck you, asshole. These newsgroups are not set up so that you and
> > Seebach can harass and label their contributors. If you can't behave,
> > leave.
>
> > And fuck you very much indeed, for I regard profanity as a far lesser
> > evil than the deliberate destruction of reputations in which you
> > engage, while claiming to defend Holy Fucking C, a piece of shit on
> > its last legs.
>
> Mmm, yes. *Definitely* better social skills.
The organizational theorist Anne Wilson Schaef writes "the addictive
system has no memory" in analyzing corporate life. You see, only in a
corporate world view is such a snap judgement as above made and even
lauded as scientifically ascetic.
As I have said, people's names and reputations are being
systematically wrecked here. I have made in the past few days a
conscious decision to express this as strongly as I can.
However, I realize that another effect of corporate life is to delink
humility from charity and destroy compassion. Richard Heathfield and
others manifest a fawning, unpleasant, Uriah Heap style humility
unlinked to respect and decency, and have had in my view no compassion
for people like Schildt or Navia.
While being "humble" and "admitting their own mistakes", they ruin
others' reputations by holding others, and never themselves, to
standards they do not meet. They greet new approaches as threats to
their own hard-won acquisition of folklore from magazines, books, and
loudmouth but popular coworkers. They retail war stories of old
coworkers and former posters in a deliberate attempt to off-topic tar
new targets by association.
So: fuck your snap judgements. I have published on computer topics
since 1976. I developed compilers at Bell Northern Research. I
developed an oceangoing stability program which contributed materially
to the safety of vessels. Based on my C skills and interpersonal
skills I was asked at Princeton to assist John Nash. I published
"Build Your Own .Net Language and Compiler". I left the field when it
turned out to populated by creeps like Seebach, who have destroyed any
interest or challenge because they think it's cute to replace %s by
scanning for %, getting it wrong.
>
> --
> Tim
>
> "That the freedom of speech and debates or proceedings in Parliament
> ought not to be impeached or questioned in any court or place out of
> Parliament"
>
> Bill of Rights 1689
== 3 of 8 ==
Date: Wed, Feb 24 2010 9:01 am
From: spinoza1111
On Feb 25, 12:14 am, Rob Kendrick <n...@rjek.com> wrote:
> On Wed, 24 Feb 2010 08:11:32 -0800 (PST)
>
> spinoza1111<spinoza1...@yahoo.com> wrote:
> > > But it's clearly OK for you to label contributors.
>
> > Yes, in self-defense. Verbal self-defense
>
> I see. Perhaps you could try to be a bit more grown up and just walk
> away rather than resorting to school playground language. Swearing at
> people you disagree with is rarely the most effective way of getting
> people to side with you.
I don't want incompetents like Richard Heathfield or Peter Seebach to
"side with me". Read Spinoza's ethics or Crito from Socrates' trial:
the wise do NOT suffer the company of fools.
>
> > > I think that book reviews are a good way of destroying people's
> > > reputations. Like, say, the reviews for your and Herb's books on
> > > Amazon.
>
> > Yes, and this insanity has got to stop. If I have to use profanity, so
> > be it.
>
> Are you suggesting that all the negative reviews there are some sort of
> conspiracy?
It is in fact well known that organized groups of people DO cooperate
in attacking books. This has happened for example to the British
physicist Stephen Wolfram: his 2002 A New Kind of Science was a
brilliant attempt to show the broad utility of cellular automata, and
he was assaulted systematically with negative reviews by other people
enraged at his accomplishment.
>
> B.
== 4 of 8 ==
Date: Wed, Feb 24 2010 9:05 am
From: spinoza1111
On Feb 25, 12:12 am, Rob Kendrick <n...@rjek.com> wrote:
> On Wed, 24 Feb 2010 08:06:32 -0800 (PST)
>
> spinoza1111<spinoza1...@yahoo.com> wrote:
> > My book, "Build Your Own .Net Language and Compiler" is still selling
> > well and has in the past ranked among the top ten compiler books on
> > Amazon. It describes technology that is a complete mystery to the regs
> > here. I suggest you buy a copy: I can use your money, and it would be
> > a worthwhile investment on your part.
>
> Your book is deceptively named. It should be called "Build your own
> toy language using Visual Basic .Net".
Quick Basic is not a toy language. The interpretive compiler shipped
with the book consists of 26000 lines of code and happens to
demonstrate that .Net Basic is even less of a "toy language": in my
view Visual Basic .Net is a BETTER tool for compiler development than
C, which has far too many gotchas to be used for compiler development.
>
> The reviews on Amazon for the book are enlightening reading, and I
> suggest people take time out to take a peek at them. use the .com
> site; the .co.uk site only has a single review, and that's from spinny
> himself.
The negative reviews started to appear, for the most part, just a few
years ago. Before that time, authors were treated with respect.
However, pimply little convenience store clerks and incompetent
programmers have discovered that they can use wikipedia, Amazon and
other open access sites to amplify their pathetic abilities by
attacking authors and real contributors based on procedure and
shibboleth, even as common thugs during the Cultural Revolution found
that they could destroy teachers.
>
> B.
== 5 of 8 ==
Date: Wed, Feb 24 2010 9:05 am
From: Rob Kendrick
On Wed, 24 Feb 2010 09:01:09 -0800 (PST)
spinoza1111 <spinoza1111@yahoo.com> wrote:
> On Feb 25, 12:14 am, Rob Kendrick <n...@rjek.com> wrote:
> > On Wed, 24 Feb 2010 08:11:32 -0800 (PST)
> >
> > spinoza1111<spinoza1...@yahoo.com> wrote:
> > > > But it's clearly OK for you to label contributors.
> >
> > > Yes, in self-defense. Verbal self-defense
> >
> > I see. Perhaps you could try to be a bit more grown up and just
> > walk away rather than resorting to school playground language.
> > Swearing at people you disagree with is rarely the most effective
> > way of getting people to side with you.
>
> I don't want incompetents like Richard Heathfield or Peter Seebach to
> "side with me".
I didn't say you did. If you don't want *anybody* to side with you,
then posting here serves little purpose.
> > Are you suggesting that all the negative reviews there are some
> > sort of conspiracy?
>
> It is in fact well known that organized groups of people DO cooperate
> in attacking books.
And your evidence for this happening to your book rather than
individuals independently expressing their displeasure is? Many of
them do appear to have actually read the book; each of them buying a
copy just to annoy you seems... odd.
B.
== 6 of 8 ==
Date: Wed, Feb 24 2010 9:16 am
From: Richard Heathfield
spinoza1111 wrote:
> On Feb 25, 12:14 am, Rob Kendrick <n...@rjek.com> wrote:
>> On Wed, 24 Feb 2010 08:11:32 -0800 (PST)
>>
>> spinoza1111<spinoza1...@yahoo.com> wrote:
>>>> But it's clearly OK for you to label contributors.
>>> Yes, in self-defense. Verbal self-defense
>> I see. Perhaps you could try to be a bit more grown up and just walk
>> away rather than resorting to school playground language. Swearing at
>> people you disagree with is rarely the most effective way of getting
>> people to side with you.
>
> I don't want incompetents like Richard Heathfield or Peter Seebach to
> "side with me".
I think he knows your opinion about myself and Seebs already. His point
is that swearing at people you disagree with is rarely the most
effective way of getting *other* people to side with you.
<nonsense snipped>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 7 of 8 ==
Date: Wed, Feb 24 2010 9:19 am
From: spinoza1111
On Feb 24, 11:58 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
> spinoza1111wrote:
> > On Feb 24, 2:25 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
> >> spinoza1111wrote:
>
> <snip>
>
> >>> and follows the lead of most other
> >>> compilers, which don't get "picky" by default.
> >> Would that they did. Then the quality of software might improve a bit.
>
> > Wouldn't a picky compiler complain about your use of pointer to void
> > in your linked list tool?
>
> Why would it do that?
I'm not certain, being the strange and monstrous combination of C
expert and lousy computer programmer that you are, but if "pointer to
void" is not a real data type, and if it should be avoided for the
most part, and since you are on record as being Mr. Picky-Picky, don't
you want your compiler to warn you that you have coded void * snoid?
It walks, it stumbles and it doth Lurch, crost the Heath
The Frankenstein monster, all are astonish'd and cry Good Grief
He knows all there is to know about the mysteries of C
But can't program properly, his code's a misery.
It uses size_t and returns an int to main
Yet somehow something's wrong, and gives the Wise a Pain:
For he is spilling bytes into a Receptacle
Not knowing how many, alas a order-"enn" Spectacle:
Able to admonish others on the use of "terminology"
Which he has mastered with swotting at the prison university,
He hath the letter which killeth but nought of the Spirit of Life:
And so everywhere he produceth not understanding but dismal murk, and
strife.
Herb is such a smoothie, and he writes so very clear
That this enrages Heathie boy, and fills him with secret fear:
Perhaps his career is nothing more than some sort of cosmic Joke
Better say something insulting to Navia, or give Nilges another Poke:
But the joke's on he, say we, with a Tee, a Hee, and Hee:
His linked list's a Coding Horror and altogether a Misery.
He doesn't participate in Massengill's learned discussion
For he's been there and done that, in his very own opinion.
The problem is that he has been there and on That he has Shat
Doing the job all wrong, like Seuss' Cat that was in Hat.
>
> <snip>
>
> --
> Richard Heathfield <http://www.cpax.org.uk>
> Email: -http://www. +rjh@
> "Usenet is a strange place" - dmr 29 July 1999
> Sig line vacant - apply within
== 8 of 8 ==
Date: Wed, Feb 24 2010 9:22 am
From: Richard Heathfield
spinoza1111 wrote:
> On Feb 24, 11:58 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
>> spinoza1111wrote:
>>> On Feb 24, 2:25 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
>>>> spinoza1111wrote:
>> <snip>
>>
>>>>> and follows the lead of most other
>>>>> compilers, which don't get "picky" by default.
>>>> Would that they did. Then the quality of software might improve a bit.
>>> Wouldn't a picky compiler complain about your use of pointer to void
>>> in your linked list tool?
>> Why would it do that?
>
> I'm not certain,
On the other hand, I *do* know why it *wouldn't* do that.
> being the strange and monstrous combination of C
> expert and lousy computer programmer that you are, but if "pointer to
> void" is not a real data type,
But it is.
> and if it should be avoided for the
> most part,
Why?
> and since you are on record as being Mr. Picky-Picky, don't
> you want your compiler to warn you that you have coded void * snoid?
No, I am not one of those who thinks void * is a bad idea.
<nonsense snipped>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
==============================================================================
TOPIC: C99 is widely used!
http://groups.google.com/group/comp.lang.c/t/0ba05b02a32efc0a?hl=en
==============================================================================
== 1 of 3 ==
Date: Wed, Feb 24 2010 9:07 am
From: Malcolm McLean
On Feb 24, 6:09 pm, Rob Kendrick <n...@rjek.com> wrote:
> jacob navia <ja...@nospam.org> wrote:
>
> > Mmmm, lcc-win passed the million downloads a year ago. There are
> > thousands of downloads in a week... I would bet that an old
> > version of Green Hills doesn't have that kind of usage,
>
> I bet lcc-win doesn't, either. Or are you suggesting that everybody
> who downloads it uses it, and only it?
>
The problem with giving stuff away for free is that you don't know who
is actually using it. If you charge then it's much more likely that
purchasers will also be users.
However downloads will bear some relationship to usage. A project with
thousands of downloads a week is clearly a success.
== 2 of 3 ==
Date: Wed, Feb 24 2010 9:03 am
From: Keith Thompson
santosh <santosh.k83@gmail.com> writes:
> Walter Banks <walter@bytecraft.com> writes:
>
>>
>>
>> Richard Heathfield wrote:
>>
>>> At least nearly-everybody, and possibly everybody, agrees with you
>>> that C99 is the One and Only C Standard, and that C90 is Legally
>>> Dead. Nevertheless, it is C90 that is doing most of the actual
>>> work.
>>
>> It may be a C90 based compilers with and without C99 extensions.
>> Most of the C90 based compilers today have a significant amount of
>> C99 as part of the feature set and standard libraries.
>>
>> In the embedded system world C99 brought a lot of order into "one
>> of" compiler specific feature sets that existed. A bigger debate is
>> should C have a feature set core with application area extensions?
>
> It seems to be the way to go for future C standards, if they don't
> want to be painted with the C99 brush. Some common subset of C90 and
> C99 could serve as the "core" language, and other features specified
> as extensions.
So the "core" would be C90 minus implicit int and the ability to use
"restrict" and "inline" as identifiers? (gets() and non-prototype
function declarations could probably also be dropped from the core.)
I'm not comfortable with that idea. If C201X takes the traditional
monolithic approach, I can count on any conforming implementation to
support all language features. If most features beyond C90 are
optional, then the implementer gets to decide whether I can use those
features.
If I want to use <complex.h>, I can use compiler X. If I want to use
<threads.h> (a feature proposed for C201X), I can use compiler Y. If
I want both I may well be out of luck.
Which is pretty much the current situtation with C99. Most compilers
implement all of C90. Many implement some subset of C99-specific
features, but the subset varies from one implementation to another.
The only difference is that the subsets are defined by each
implementation, not by the standard.
If getting all implementers to support the entire language is an
unrealistic goal, the subset approach might be a necessary compromise,
but I hope it isn't.
Or do I misunderstand what you're proposing?
> This will atleast avoid the black-and-white, binary, impression that
> many people seem to have, when considering C99.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
== 3 of 3 ==
Date: Wed, Feb 24 2010 9:13 am
From: Rob Kendrick
On Wed, 24 Feb 2010 09:07:21 -0800 (PST)
Malcolm McLean <malcolm.mclean5@btinternet.com> wrote:
> However downloads will bear some relationship to usage. A project with
> thousands of downloads a week is clearly a success.
Absolutely, I just wanted to point out that it has very little
relationship to people currently using it.
A project I'm involved in gets hundreds of downloads a week, and yet I
can't think there are more than a thousand people interested in it at
all.
B.
==============================================================================
TOPIC: Experiment: functional concepts in C
http://groups.google.com/group/comp.lang.c/t/7889fc59043eb32b?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Feb 24 2010 9:16 am
From: raltbos@xs4all.nl (Richard Bos)
jacob navia <jacob@nospam.org> wrote:
> Then, to read a 4 digit year from character into an integer you use
> several temporary objects, by reading the characters into a list
> container temp, that calls a general routine to convert a list
> container into a boxed multi-precision integer that gives a boxed
> integer that is converted into an unboxed one... eventually.
...and that is precisely why a generalised container library for C is
exactly the wrong thing to write.
Richard
==============================================================================
TOPIC: Any exit status without explicitely using return /exit
http://groups.google.com/group/comp.lang.c/t/6e91ccafedde0c25?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Feb 24 2010 9:16 am
From: raltbos@xs4all.nl (Richard Bos)
Debanjan <debanjan4you@gmail.com> wrote:
> On Feb 24, 2:02=A0pm, Keith Thompson <ks...@mib.org> wrote:
> > Debanjan <debanjan4...@gmail.com> writes:
> > > This actually bugging me from quite sometime now.The question is like
> > > this : How to set the the exit status of a program to any value
> > > without explicitly using return/exit in gcc ?
> > A more relevant question: Why don't you want to use return or exit?
> > That's what they're for.
>
> There are few online coding challenge contest where less the number of
> character more the points you earned
That is an _extremely_ bad idea. Don't do it. Write for legibility
instead.
Richard
==============================================================================
TOPIC: Ask for book for efficient coding in C
http://groups.google.com/group/comp.lang.c/t/1b697accaac68aeb?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Feb 24 2010 9:16 am
From: raltbos@xs4all.nl (Richard Bos)
MBALOVER <mbalover9@gmail.com> wrote:
> I am reading the web site and it is really helpful.
Be aware that at your current level of proficiency (i.e., given that you
have to ask these questions in the first place!), the most important
section by far for you is the one titled "GOTCHAS".
Richard
==============================================================================
You received this message because you are subscribed to the Google Groups "comp.lang.c"
group.
To post to this group, visit http://groups.google.com/group/comp.lang.c?hl=en
To unsubscribe from this group, send email to comp.lang.c+unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home