Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: lcc first e...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 34 of 99 Topic 26074 of 27343
Post > Topic >>

Re: lcc first experience

by roberson@[EMAIL PROTECTED] (Walter Roberson) May 8, 2008 at 06:28 PM

In article <fvve2b$i0q$1@[EMAIL PROTECTED]
>, jacob navia  <jacob@[EMAIL PROTECTED]
> wrote:
>Walter Roberson wrote:
>[snip]

>> I must therefore disagree with the claim that,

>>> all statements have side-
>>> effects. 

>You know perfectly well what the intent of the sentence was,

No, I do *not* understand the intent of that ****tion of the sentance
at all.

One of the semi-regular posters here takes pains to make a
distinction, of great im****tance to him, between 'functions' and
'procedures', saying (if I recall correctly) that 'functions'
return values but have no side effects, and procedures have side
effects but return no values. Personally I consider that an
incorrect and harmful distinction to make in C (since it leaves
out the possibility of having side effects -and- returning a value,
which is very common in programming, if only to signal the
success or failure of the attempted side effects). But it is
im****tant to that poster.

When Paul Heish wrote that in C "all statements have side-effects",
then I demonstrated, with reference to the C89 standard, that
the claim is untrue, at least as far as C89 defines "statements".
Paul might be defining "statements" differently; if so then he
must now indicate what he was referring to. Paul has a recognized
expertise in some aspects of C, and it would be unfortunate if some
people therefore took his claim at face value without whatever
context Paul might supply that would make claim correct in a certain
light.


>and
>you just want to show how clever you are.

Null statements and other statements without side effects are not
rare in C. Consider for example,

bignum_list factor_big_number(bignum_t num_to_factor) {
  /* to be implemented later */
}

This form of function is not some kind of special exception: the
grammar uses compound-statement at that part in function-definition and
the function body of this factor_big_number is an example of a
compound-statement in which the optional declaration and optional
statement list have both been omitted.


>Try to write a program
>consisting of only

>jumps
>labels
>empty lists
>constants


Okay, here's one:

int main(void) { return 0; }

That's the unix program 'true'. Add the appropriate include
and return EX_FAILURE and you have the unix program 'false'.

That 'return' is a jump-statement I do***ented in my previous
posting in this thread.


But in any case, my success in this challenge is irrelevant.

Paul Heish said that "all" statements in C had side effects.
I pointed out not just one but several statement forms in C
that do not have side effects. Therefore his use of "all" was
either wrong or implied an unusual meaning of "statement".
If he had said "nearly all" or "most" then there would have been
little to talk about, other than perhaps why he bothered to point out
a tautology.


Suppose I had made the following claim:

  "All of Jacob's lcc-win versions have stupid fatal errors."

Would the difference between "all" and "some" not then be of im****tance
to you? I'm sure you could easily take into stride if I had said,

  "I think lcc-win is an overall well-done product, but some
   of Jacob's lcc-win versions have stupid fatal errors."

Because if -none- of your versions -ever- have stupid fatal errors, you
are doing better than 99.99999% of the population -- it happens to
all of us from time to time, and we learn from it and go on.
But if I had said something like that, then wouldn't it have been
a *very* different meaning if I had used "all" instead of "some"?

In short, "all" vs "some" *is* an im****tant distinction, not just
a matter of "being clever".
-- 
  "MAMA: Oh--So now it's life. Money is life. Once upon a time freedom
   used to be life--now it's money. I guess the world really do change.
   WALTER: No--it was always money, Mama. We just didn't know about it."
                                              -- Lorraine Hansberry
 




 99 Posts in Topic:
[OT] lcc first experience
Morris Dovey <mrdovey@  2008-05-06 12:33:06 
Re: lcc first experience
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 10:41:28 
Re: lcc first experience
Morris Dovey <mrdovey@  2008-05-06 13:02:55 
Re: lcc first experience
Johannes Bauer <dfnson  2008-05-06 20:51:07 
Re: lcc first experience
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 15:35:32 
Re: lcc first experience
Antoninus Twink <nospa  2008-05-06 20:10:35 
Re: lcc first experience
Morris Dovey <mrdovey@  2008-05-06 13:21:40 
Re: [OT] lcc first experience
Keith Thompson <kst-u@  2008-05-06 11:19:10 
Re: lcc first experience
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 11:47:38 
Re: [OT] lcc first experience
Morris Dovey <mrdovey@  2008-05-06 13:49:09 
Re: lcc first experience
Paul Hsieh <websnarf@[  2008-05-07 10:52:56 
Re: lcc first experience
Eric Sosman <Eric.Sosm  2008-05-07 13:58:53 
Re: lcc first experience
dj3vande@[EMAIL PROTECTED  2008-05-07 18:41:15 
Re: lcc first experience
Spiros Bousbouras <spi  2008-05-08 11:20:03 
Re: lcc first experience
muntyan@[EMAIL PROTECTED]  2008-05-08 12:49:22 
Re: lcc first experience
roberson@[EMAIL PROTECTED  2008-05-08 20:11:47 
Re: lcc first experience
muntyan@[EMAIL PROTECTED]  2008-05-08 19:31:19 
Re: lcc first experience
Richard Heathfield <rj  2008-05-09 05:25:35 
Re: lcc first experience
jacob navia <jacob@[EM  2008-05-09 08:44:45 
Re: lcc first experience
Richard Heathfield <rj  2008-05-09 07:35:23 
Re: lcc first experience
roberson@[EMAIL PROTECTED  2008-05-09 14:59:38 
Re: lcc first experience
Nick Keighley <nick_ke  2008-05-09 01:48:41 
Re: lcc first experience
Spiros Bousbouras <spi  2008-05-08 16:17:14 
Re: lcc first experience
richard@[EMAIL PROTECTED]  2008-05-08 23:45:58 
Re: lcc first experience
Nick Keighley <nick_ke  2008-05-09 01:50:59 
Re: lcc first experience
richard@[EMAIL PROTECTED]  2008-05-09 12:00:03 
Re: lcc first experience
CBFalconer <cbfalconer  2008-05-07 17:48:52 
Re: lcc first experience
cri@[EMAIL PROTECTED] (R  2008-05-08 02:30:57 
Re: lcc first experience
CBFalconer <cbfalconer  2008-05-08 13:40:41 
Re: lcc first experience
cri@[EMAIL PROTECTED] (R  2008-05-10 04:39:47 
Re: lcc first experience
Paul Hsieh <websnarf@[  2008-05-08 09:55:08 
Re: lcc first experience
roberson@[EMAIL PROTECTED  2008-05-08 17:37:05 
Re: lcc first experience
jacob navia <jacob@[EM  2008-05-08 19:42:31 
Re: lcc first experience
roberson@[EMAIL PROTECTED  2008-05-08 18:28:31 
Re: lcc first experience
Keith Thompson <kst-u@  2008-05-08 11:55:57 
Re: lcc first experience
muntyan@[EMAIL PROTECTED]  2008-05-08 15:13:58 
Re: lcc first experience
roberson@[EMAIL PROTECTED  2008-05-09 02:07:23 
Re: lcc first experience
Paul Hsieh <websnarf@[  2008-05-08 13:24:45 
Re: lcc first experience
Eric Sosman <Eric.Sosm  2008-05-08 17:20:45 
Re: lcc first experience
jacob navia <jacob@[EM  2008-05-09 07:43:41 
Re: lcc first experience
Richard Heathfield <rj  2008-05-09 05:54:58 
Re: lcc first experience
roberson@[EMAIL PROTECTED  2008-05-09 03:31:44 
Re: lcc first experience
richard@[EMAIL PROTECTED]  2008-05-08 21:02:02 
Re: lcc first experience
richard@[EMAIL PROTECTED]  2008-05-08 21:08:29 
Re: lcc first experience
Keith Thompson <kst-u@  2008-05-08 15:15:32 
Re: lcc first experience
CBFalconer <cbfalconer  2008-05-08 19:04:25 
Re: lcc first experience
Keith Thompson <kst-u@  2008-05-08 22:40:25 
Re: lcc first experience
vippstar@[EMAIL PROTECTED  2008-05-08 14:44:50 
Re: lcc first experience
Spiros Bousbouras <spi  2008-05-08 16:09:33 
Re: lcc first experience
Eric Sosman <esosman@[  2008-05-08 21:14:14 
Re: lcc first experience
Nick Keighley <nick_ke  2008-05-09 01:19:55 
Re: [OT] lcc first experience
jacob navia <jacob@[EM  2008-05-06 20:26:59 
Re: [OT] lcc first experience
"Malcolm McLean"  2008-05-06 21:48:31 
Re: [OT] lcc first experience
nembo kid <user@[EMAIL  2008-05-07 17:51:45 
Re: [OT] lcc first experience
roberson@[EMAIL PROTECTED  2008-05-07 16:03:30 
Re: lcc first experience
vippstar@[EMAIL PROTECTED  2008-05-07 09:24:27 
Re: [OT] lcc first experience
Morris Dovey <mrdovey@  2008-05-07 12:06:24 
Re: [OT] lcc first experience
Joe Wright <joewwright  2008-05-07 16:28:29 
Re: lcc first experience
Bart <bc@[EMAIL PROTEC  2008-05-07 13:59:16 
Re: lcc first experience
jacob navia <jacob@[EM  2008-05-08 00:55:56 
Re: lcc first experience
Eric Sosman <esosman@[  2008-05-07 20:32:37 
Re: lcc first experience
Keith Thompson <kst-u@  2008-05-07 18:26:14 
binary literals (was Re: lcc first experience)
Chris Torek <nospam@[E  2008-05-08 02:18:14 
Re: lcc first experience
"Dik T. Winter"  2008-05-08 10:12:38 
Re: lcc first experience
richard@[EMAIL PROTECTED]  2008-05-08 10:36:25 
Re: lcc first experience
CBFalconer <cbfalconer  2008-05-07 20:26:31 
Re: binary literals (was Re: lcc first experience)
Ben Bacarisse <ben.use  2008-05-08 12:14:32 
Re: [OT] lcc first experience
rlb@[EMAIL PROTECTED] (R  2008-05-08 06:29:24 
Re: [OT] lcc first experience
CBFalconer <cbfalconer  2008-05-08 13:45:24 
Re: [OT] lcc first experience
rlb@[EMAIL PROTECTED] (R  2008-05-16 10:37:27 
Re: lcc first experience
Spiros Bousbouras <spi  2008-05-09 11:42:36 
Re: lcc first experience
Spiros Bousbouras <spi  2008-05-09 11:53:06 
Re: lcc first experience
Old Wolf <oldwolf@[EMA  2008-05-11 16:03:04 
Re: lcc first experience
Antoninus Twink <nospa  2008-05-09 11:42:57 
Re: [OT] lcc first experience
Harald van =?UTF-8?b?RMSz  2008-05-09 18:34:51 
Re: [OT] lcc first experience
jacob navia <jacob@[EM  2008-05-09 19:23:54 
Re: [OT] lcc first experience
Morris Dovey <mrdovey@  2008-05-09 12:29:04 
Re: [OT] lcc first experience
jacob navia <jacob@[EM  2008-05-09 20:03:18 
Re: [OT] lcc first experience
Morris Dovey <mrdovey@  2008-05-09 13:58:26 
Re: [OT] lcc first experience
rlb@[EMAIL PROTECTED] (R  2008-05-16 10:38:37 
Re: [OT] lcc first experience
Eric Sosman <esosman@[  2008-05-09 13:39:04 
Re: [OT] lcc first experience
jacob navia <jacob@[EM  2008-05-09 19:59:38 
Re: [OT] lcc first experience
Eric Sosman <esosman@[  2008-05-09 17:10:52 
Re: [OT] lcc first experience
Eric Sosman <esosman@[  2008-05-10 17:04:50 
Re: [OT] lcc first experience
Richard Heathfield <rj  2008-05-09 17:51:42 
Re: [OT] lcc first experience
jacob navia <jacob@[EM  2008-05-09 19:56:19 
Re: [OT] lcc first experience
Flash Gordon <spam@[EM  2008-05-09 19:33:22 
Re: [OT] lcc first experience
Keith Thompson <kst-u@  2008-05-09 13:03:38 
Re: [OT] lcc first experience
Flash Gordon <spam@[EM  2008-05-09 18:27:59 
Re: [OT] lcc first experience
Harald van =?UTF-8?b?RMSz  2008-05-09 20:25:29 
Re: lcc first experience
Harald van =?UTF-8?b?RMSz  2008-05-09 20:52:51 
Re: lcc first experience
Antoninus Twink <nospa  2008-05-09 20:55:58 
Re: lcc first experience
"Malcolm McLean"  2008-05-11 10:09:21 
Re: lcc first experience
Harald van =?UTF-8?b?RMSz  2008-05-09 21:06:34 
Re: [OT] lcc first experience
CBFalconer <cbfalconer  2008-05-09 16:53:05 
Re: [OT] lcc first experience
Antoninus Twink <nospa  2008-05-09 23:41:13 
Re: [OT] lcc first experience
Harald van =?UTF-8?b?RMSz  2008-05-09 23:50:09 
Re: [OT] lcc first experience
Ben Bacarisse <ben.use  2008-05-10 03:28:11 
Re: [OT] lcc first experience
Antoninus Twink <nospa  2008-05-10 23:32:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 22:01:56 CDT 2008.