For Programmers: Free Programming Magazines  


Home > Archive > C > August 2004 > standards documents off-topic in comp.lang.c









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author standards documents off-topic in comp.lang.c
E. Robert Tisdale

2004-08-20, 4:32 am

Something that calls itself Flash Gordon wrote:

> E. Robert Tisdale wrote:
>
>
> Not according to the C standard according to what the more knowledgeable
> people around here have said.


You are .
The C standards documents are *not*
part of the C computer programming language.
There is no 'object' keyword os standard identifier
in the C computer programming language.
The C standards documents have *nothing* to do with programming in C.
They exist *only* to specify the C computer programming language.
Terms, like object, given special meaning in the standards documents
to help with these specifications,
have *no* meaning outside of the scope of the standards documents
other that those meanings commonly used
in the context of a computer programming language.

Questions (remarks) about the C standards are off-topic in comp.lang.c
There is a more appropriate form for that -- comp.std.c

Please direct all your questions (remarks)
about the C standards documents to the appropriate newsgroup.
Keith Thompson

2004-08-20, 4:32 am

"E. Robert Tisdale" <E.Robert.Tisdale@jpl.nasa.gov> writes:
[...]
> You are .
> The C standards documents are *not*
> part of the C computer programming language.


The C standards documents define the C programming language.

> There is no 'object' keyword os standard identifier
> in the C computer programming language.


Nobody has claimed that there is. There is no "function", "array", or
"pointer" keyword or standard identifier in C; do you conclude from
that that C doesn't have functions, arrays, or pointers?

> The C standards documents have *nothing* to do with programming in C.


Utter nonsense.

> They exist *only* to specify the C computer programming language.


Yes, of course they specify the C programming language. That makes
them extremely relevant to programming in C (and, equally, to
implementing a C compiler and/or library).

> Terms, like object, given special meaning in the standards documents
> to help with these specifications,
> have *no* meaning outside of the scope of the standards documents
> other that those meanings commonly used
> in the context of a computer programming language.


Utter nonsense.

Given a choice of using terms as defined by the C standard (as is the
nearly universal consensus of this newsgroup), or using terms as
defined by E. Robert Tisdale, it's not a difficult decision.

> Questions (remarks) about the C standards are off-topic in comp.lang.c
> There is a more appropriate form for that -- comp.std.c


comp.lang.c is for discussion of the C programming language, which is
defined by the C standards. comp.std.c is for discussion of the C
standards *as documents*. "What is an object?" would be an
appropriate question for comp.lang.c; the answer is found in the
standard. "The standard's definition of 'object' is ambiguous" would
be an appropriate topic for comp.std.c. (This is an example, and is
not meant to imply that I think the definition is actually ambiguous.)

> Please direct all your questions (remarks)
> about the C standards documents to the appropriate newsgroup.


Please stop lying to newbies. Those of us who have been here for a
while know enough not to take you seriously, but inexperienced
programmers might not.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
CBFalconer

2004-08-20, 4:32 am

"E. Robert Tisdale" wrote:
> Something that calls itself Flash Gordon wrote:>
>
> You are .
> The C standards documents are *not*
> part of the C computer programming language.


You are getting objectionable again. The C language is defined by
the C standards documents, at least the only form of C discussed
here.

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


Flash Gordon

2004-08-20, 4:32 am

On Sun, 15 Aug 2004 04:15:33 GMT
Keith Thompson <kst-u@mib.org> wrote:

<snip>

> Please stop lying to newbies. Those of us who have been here for a
> while know enough not to take you seriously, but inexperienced
> programmers might not.


I'm not actually a newbie, I just don't have a copy of the standard
myself and don't post very often so I left in that I was relying on what
I had read by those I respect :-)

I slightly morphed the name a while back, but not enough to confuse
anyone who knows me (the domain name did not change). A few years
further back I changed domain but not the name I posted under.
--
Flash Gordon
Sometimes I think shooting would be far too good for some people.
Although my email address says spam, it is real and I read it.
Keith Thompson

2004-08-20, 4:32 am

Flash Gordon <spam@flash-gordon.me.uk> writes:
> On Sun, 15 Aug 2004 04:15:33 GMT
> Keith Thompson <kst-u@mib.org> wrote:
>
> <snip>
>
>
> I'm not actually a newbie, I just don't have a copy of the standard
> myself and don't post very often so I left in that I was relying on what
> I had read by those I respect :-)
>
> I slightly morphed the name a while back, but not enough to confuse
> anyone who knows me (the domain name did not change). A few years
> further back I changed domain but not the name I posted under.


No offense intended. I wasn't referring specifically to you; I hadn't
even noticed that you wrote the article to which ERT was responding.
In effect, everything posted to a newsgroup is addressed to everyone
reading it.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Flash Gordon

2004-08-20, 4:32 am

On Sun, 15 Aug 2004 13:35:57 GMT
CBFalconer <cbfalconer@yahoo.com> wrote:

> Flash Gordon wrote:
>
> He wasn't talking about you, but about ERT, whose foibles are well
> known here.


I realised he was talking about ERT lying. My point was that in this
case ERTs drivel was not in response to a newbie but in response to
someone who ahs been around the block a couple of times.
--
Flash Gordon
Sometimes I think shooting would be far too good for some people.
Although my email address says spam, it is real and I read it.
Flash Gordon

2004-08-20, 4:32 am

On Sun, 15 Aug 2004 14:20:29 GMT
Keith Thompson <kst-u@mib.org> wrote:

> Flash Gordon <spam@flash-gordon.me.uk> writes:


<snip>

> No offense intended. I wasn't referring specifically to you; I hadn't


No offence was taken.

> even noticed that you wrote the article to which ERT was responding.
> In effect, everything posted to a newsgroup is addressed to everyone
> reading it.


True.
--
Flash Gordon
Sometimes I think shooting would be far too good for some people.
Although my email address says spam, it is real and I read it.
Default User

2004-08-20, 4:32 am

CBFalconer wrote:

> You are getting objectionable again. The C language is defined by
> the C standards documents, at least the only form of C discussed
> here.



What is it about Trollsdale? It seems he can go only so long before
exploding into a bullshit spew all over the newsgroup.




Brian Rodenborn
Keith Thompson

2004-08-21, 3:57 pm

"E. Robert Tisdale" <E.Robert.Tisdale@jpl.nasa.gov> writes:
> Keith Thompson wrote:
>
>
> Aren't you being just a little disingenuous?


Nope.

> I don't recall that you have ever cited the standards documents
> to help new subscribers answer their questions about programming in C.


I've cited the standards documents here numerous times. I'm not sure
whether I've ever done so "to help new subscribers".

What I don't do is post information that's blatantly inconsistent with
the standard, or make up confusing definitions of words.

Several articles upthread, you specifically said that "A function is
an object." It isn't, for reasons we've already discussed. I cited
the standard to refute your false statement.

[...]

> You use it as a weapon to cut off legitimate discussion
> as you did in this case.


I use it to correct errors.

> I don't think that the original poster, "junky_fellow",
> had the slightest interest in how the term 'object'
> was used in the C standards documents.


Maybe he does, maybe he doesn't. In my opinion, he should.

> Your remarks seem to imply that the C standards documents
> are the *only* legitimate source of information about C programming,
> that every other source of information about C programming is irrelevant
> and that the standards documents are unimpeachable.


Not at all. The C standards define the language. Other documents
describe the language defined by the standard. There are numerous
legitimate sources of information about C programming; the standard is
the most definitive source. There are errors in the standards, but
I'm not aware of any related to the meaning of the word "object".

> I don't share your fanaticism.
> The C programming language encompasses a wider world
> than your copy of the C standards documents.


I've just looked up the word "object" in the indexes of K&R2 and H&S5
(that's Harbison & Steele, 5th edition). Both define the term in a
manner consistent with the definition in the standard; both make it
clear that a function is not an object. The only support I've seen
for your assertion that a function is an object was a Google search
that, as it turned out, didn't support your point.

I chose to use the standard to disprove your statement that a function
is an object, but I could have used any of a number of other sources.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
E. Robert Tisdale

2004-08-21, 3:57 pm

Keith Thompson wrote:

> I probably should have written "Please stop misleading newbies."


Aren't you being just a little disingenuous?
I don't recall that you have ever cited the standards documents
to help new subscribers answer their questions about programming in C.
You use it as a weapon to cut off legitimate discussion
as you did in this case.
I don't think that the original poster, "junky_fellow",
had the slightest interest in how the term 'object'
was used in the C standards documents.

Your remarks seem to imply that the C standards documents
are the *only* legitimate source of information about C programming,
that every other source of information about C programming is irrelevant
and that the standards documents are unimpeachable.

I don't share your fanaticism.
The C programming language encompasses a wider world
than your copy of the C standards documents.
Mabden

2004-08-22, 8:55 pm

"Keith Thompson" <kst-u@mib.org> wrote in message
news:ln657l6nq2.fsf@nuthaus.mib.org...
> "E. Robert Tisdale" <E.Robert.Tisdale@jpl.nasa.gov> writes:
> [...]
>
> The C standards documents define the C programming language.


Yet, my compiler was written in 1994. And my Bible is K&R2.
What part of that involves C99? How can your standards define C programming
for my environment?
Does the American Heritage Dictionary define English for the United Kingdom?

>
> Utter nonsense.


Not really. Don't be a standards snob. Not everyone has access to modren
technology. As you have said in the past, C must encompass many kinds of
hardware, and many years of development.

>
> Yes, of course they specify the C programming language. That makes
> them extremely relevant to programming in C (and, equally, to
> implementing a C compiler and/or library).


But not EVERY C compiler and / or library.

>
> Utter nonsense.


K&R doesn't discuss onjects, that I recall. Please let me know if I missed a
page.

> Given a choice of using terms as defined by the C standard (as is the
> nearly universal consensus of this newsgroup)


Perhaps, the minority is afeared of the hail storm of hate, were they to
speak up.

>
> Please stop lying to newbies. Those of us who have been here for a
> while know enough not to take you seriously, but inexperienced
> programmers might not.


I hope not to be lumped into a similar group. I try to understand the
technical boundaries of C, but I have never read a Standards document. I
have many years of C programming under my belt and feel quite savvy with the
language. But I have had issues with fine technical points. As you may
remember, I have no problem admitting to error if you can convince me you
are correct.
I am not familiar with the general distaste for Mr. E. Robert Tisdale, so I
realize I could be making a mistake by agreeing with some of his points, but
if that is all it takes to be dismissed on this newsgroup then you should
all be ashamed of yourselves.
Also, I don't prefer the term "lying" when one is stating an opinion. Surely
an opinion is just that, and not a lie. I found you, Keith, to be quite
tolerant in our other discussion, and would prefer to see you keep the same
detachment regardless of the poster.

--
Mabden


Mabden

2004-08-22, 8:55 pm

"CBFalconer" <cbfalconer@yahoo.com> wrote in message
news:411EE5E4.FA97830@yahoo.com...
> You are getting objectionable again. The C language is defined by
> the C standards documents, at least the only form of C discussed
> here.


I hope not!
I have no such document and I wish to post here. I have written C code for
over 15 years. Are you excluding me?

--
Mabden


Flash Gordon

2004-08-22, 8:55 pm

On Mon, 16 Aug 2004 10:29:29 GMT
"Mabden" <mabden@sbc_global.net> wrote:

> "Keith Thompson" <kst-u@mib.org> wrote in message
> news:ln657l6nq2.fsf@nuthaus.mib.org...
>
> Yet, my compiler was written in 1994. And my Bible is K&R2.
> What part of that involves C99? How can your standards define C
> programming for my environment?


It is defined by the old C89 standard which it almost certainly
references somewhere in the documentation.

> Does the American Heritage Dictionary define English for the United
> Kingdom?


Completely irrelevant. There is no English Standard, although there is
standard English and standard American.

>
> Not really. Don't be a standards snob. Not everyone has access to
> modren technology. As you have said in the past, C must encompass many
> kinds of hardware, and many years of development.


As a programmer on multiple different systems, and one with significant
embedded experience, I find the C standard to be extremely relevant. It
saves me from having to learn a new language for every architecture.

>
> But not EVERY C compiler and / or library.


Yes, every C compiler, every implementation of the standard C library,
and every implementation of a library written in C.

>
> K&R doesn't discuss onjects, that I recall. Please let me know if I
> missed a page.


Try looking up object in the index. It has two entries the second of
which is P196, section A5 Objects and Lvalues.

<snip>

For technical discussions it is useful to have rigid definitions of the
terms so that people know exactly what they are talking about. C is
defined by a standard and therefor it makes sense to use the technical
terms as defined in the standard. To facilitate discussions those
regulars with copies of the standard have shown themselves to be willing
to provide appropriate quotes from it so that the rest of us can see
what these definitions are, something which I appreciate. I especially
appreciate it when they point out mistakes in my posts as this makes me
a better developer.
--
Flash Gordon
Sometimes I think shooting would be far too good for some people.
Although my email address says spam, it is real and I read it.
CBFalconer

2004-08-22, 8:55 pm

Mabden wrote:
> "CBFalconer" <cbfalconer@yahoo.com> wrote in message
>
>
> I hope not!
> I have no such document and I wish to post here. I have written C
> code for over 15 years. Are you excluding me?


You have no reason not to have the document. A suitable version
is available free (see sig). This group, by mutual consent,
loosely limits its discussions to things that can be traced to the
standard and its predecessors. This tends to ensure that advice
etc. is universally applicable.

--
Some useful references:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>
<http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
<http://www.dinkumware.com/refxc.html> C-library


Alan Balmer

2004-08-22, 8:55 pm

On Mon, 16 Aug 2004 10:29:29 GMT, "Mabden" <mabden@sbc_global.net>
wrote:

>K&R doesn't discuss onjects, that I recall. Please let me know if I missed a
>page.
>

You missed two. Pages 195 and 197.

(Assuming you really meant "object.")

--
Al Balmer
Balmer Consulting
removebalmerconsultingthis@att.net
Mabden

2004-08-22, 8:55 pm

"Keith Thompson" <kst-u@mib.org> wrote in message
news:lnvffi1v94.fsf@nuthaus.mib.org...
> "E. Robert Tisdale" <E.Robert.Tisdale@jpl.nasa.gov> writes:

[snip]
> Not at all. The C standards define the language. Other documents
> describe the language defined by the standard. There are numerous
> legitimate sources of information about C programming; the standard is
> the most definitive source. There are errors in the standards, but
> I'm not aware of any related to the meaning of the word "object".
>
>
> I've just looked up the word "object" in the indexes of K&R2 and H&S5
> (that's Harbison & Steele, 5th edition). Both define the term in a
> manner consistent with the definition in the standard; both make it
> clear that a function is not an object. The only support I've seen
> for your assertion that a function is an object was a Google search
> that, as it turned out, didn't support your point.
>
> I chose to use the standard to disprove your statement that a function
> is an object, but I could have used any of a number of other sources.


I think the term "object" has changed meanings since C++ came about. In K&R,
it seems to me that almost any memory location can be called an "object". In
such a case, a pointer is an object and a function name, like an array name,
can be distilled down to be called an object.

Does Appendix K&R2 A7.1 not hint at this?

Just asking...
--
Mabden


Keith Thompson

2004-08-22, 8:56 pm

Dan.Pop@cern.ch (Dan Pop) writes:
> In <lnvffi3jth.fsf@nuthaus.mib.org> Keith Thompson <kst-u@mib.org> writes:

[...]
>
> You're /confusing here. First, the -W and -Wall options have
> absolutely nothing to do with standard conformance: they enable *only*
> diagnostics that are NOT required by any C standard. gcc has only one
> standard conforming mode and this is enabled using -ansi -pedantic, or,
> equivalently, -std=c89 -pedantic (I'm deliberately ignoring the option
> for C94 conformance, to keep things as simple as possible). -ansi
> disables gcc's deviations from the standard and -pedantic enables some
> required diagnostics that gcc doesn't generate by default.


I had assumed that "-W -Wall" enabled some required diagnostics, but
if you say "-ansi -pedantic" suffices, I'll take your word for it.

(Using "-W -Wall" as well is generally a good idea, but that's not
necessarily related to conformance.)

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Flash Gordon

2004-08-24, 9:02 am

On Tue, 17 Aug 2004 10:20:02 GMT
"Mabden" <mabden@sbc_global.net> wrote:

<snip>

> I think the term "object" has changed meanings since C++ came about.


Not for C it hasn't, since C is defined by the C standards and C++ is
defined by the C++ standards.

> In K&R, it seems to me that almost any memory location can be called
> an "object".


No, K&R in section A.5 (which I am sure I've mentioned elsewhere in this
thread) says "An /object/ is a named region of storage;". Since a
function is not a region of storage it cannot be an object. Others have
quoted the relevant parts of the standard which define an object (and
which take precedence of K&R) which say similar things.

> In such a case, a pointer is an object


The region of storage in which the pointer is stored is an object.

> and a function
> name, like an array name, can be distilled down to be called an
> object.


No.

> Does Appendix K&R2 A7.1 not hint at this?


No, since it does not say the function is a region of storage.

> Just asking...


It's been answered already several times. A function is NOT an object
in C.
--
Flash Gordon
Sometimes I think shooting would be far too good for some people.
Although my email address says spam, it is real and I read it.
Mabden

2004-08-24, 9:02 am

"Mabden" <mabden@sbc_global.net> wrote in message
news:mZkUc.5157$6w2.4071@newssvr27.news.prodigy.com...
> "Keith Thompson" <kst-u@mib.org> wrote in message
> news:lnvffi1v94.fsf@nuthaus.mib.org...
> [snip]
>
> I think the term "object" has changed meanings since C++ came about. In

K&R,
> it seems to me that almost any memory location can be called an "object".

In
> such a case, a pointer is an object and a function name, like an array

name,
> can be distilled down to be called an object.
>
> Does Appendix K&R2 A7.1 not hint at this?
>


More clarification:
A4. "An object... its interpretation depends on two main attributes: its
storage class and its type."
A4.3 "Besides the basic types, there is a conceptually infinite class of
derived types constructed from the fundamental types in the following ways:"
"functions returning objects of a given type".
"In general these methods of constructing objects can be applied
recursively."

I do admit that the text tends to talk about "objects and functions", so the
authors do seem to lump them together, yet keep them distinct.

So [OT] what is a function in today's OOP world? Is it an object or just a
thing called a function? Any C++ gurus know the answer to that?

--
Mabden


Dan Pop

2004-08-26, 3:57 pm

In <ln657hvfg4.fsf@nuthaus.mib.org> Keith Thompson <kst-u@mib.org> writes:

>Dan.Pop@cern.ch (Dan Pop) writes:
>[...]
>
>I had assumed that "-W -Wall" enabled some required diagnostics, but
>if you say "-ansi -pedantic" suffices, I'll take your word for it.


You don't have to, it's well documented in the gcc man page.

>(Using "-W -Wall" as well is generally a good idea, but that's not
>necessarily related to conformance.)


It is -Wall -O that is a good idea. -Wall fails to identify the usage
of uninitialised variables if optimisation is not turned on and -W
generates objectionable warnings (that's why its functionality was
not included into -Wall in the first place).

-W is fine for experienced people who understand the underlying issues
and agree with them. Its diagnostics, however, could be confusing
to newbies and lead them to break perfectly good code, in order to
shut them up.

I wouldn't recommend -W to newbies or to anyone else who doesn't have a
clear understanding of its effects (and those who do, don't need anyone
else's recommendations in order to decide whether to use it or not).

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
Dave Thompson

2004-08-26, 3:57 pm

On Tue, 17 Aug 2004 10:20:02 GMT, "Mabden" <mabden@sbc_global.net>
wrote:

> "Keith Thompson" <kst-u@mib.org> wrote in message
> news:lnvffi1v94.fsf@nuthaus.mib.org...

<snip>
[color=darkred]
> I think the term "object" has changed meanings since C++ came about. In K&R,
> it seems to me that almost any memory location can be called an "object". In
> such a case, a pointer is an object and a function name, like an array name,
> can be distilled down to be called an object.
>
> Does Appendix K&R2 A7.1 not hint at this?
>

My K&R2 went missing some time ago, but the C standard specifically
says "region of _data_ storage" (emphasis added). Note it doesn't
require addressibility; this includes variables (aka named objects)
put in machine registers, possibly but not necessarily by declaring
them with storage class 'register'.

On (essentially?) all computers today compiled code for functions is
in fact stored in memory; and on most of them at least some of the
time that memory is addressible in the same way as data. *In those
environments* a C compiler usually(?) allows you to interchange
function and data pointers, and there can sometimes be good reason to
do so, although it's not portable and often virtual memory is set up
so that you cannot *write* to function addresses.

But C intentionally does not require this. In fact one of the quite
early "ports"* of C -- long before C89 and K&R2 -- was to models of
the PDP-11 with separate "instruction" (code) and data space, called
"split I&D" and more generally known as "Harvard architecture". On
those machines the code to dereference a data pointer simply cannot
access code, and that to dereference (call) a function pointer (or
call an actual function, the more common case) simply cannot access
data; in assembler you can access code as data with special
instructions, MFPI/MTPI, subject IIRC to privilege, but the compiler
doesn't know to generate them. * "Port" in quotes because the compiler
can generate the same instructions and data as for nonsplit -11s; the
only difference is a tweak in the linker, and of course some changes
in the VM in the underlying OS, which isn't normally considered part
of the C implementation although in a formal sense it is.

<OT> And it hasn't changed officially even *in* C++ -- which still
uses 'object' in the C meaning, and for the things that OO people call
'object' it consistently uses (often clumsier) forms like 'object of
class type', 'class object', or more specific things like 'object of
non-POD class type having a nontrivial constructor'. </>

- David.Thompson1 at worldnet.att.net
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com