In <cce29dab-004d-4e77-a379-631bfb94c...@q40g2000prh.googlegroups.com>,
spinoza1111 wrote: > On Nov 8, 6:05 pm, Seebs <usenet-nos...@seebs.net> wrote:
<usual Nilges nonsense snipped>
>> When you declare a "const char *p", you are declaring, not that p >> is a constant, but that you cannot modify the things pointed to by >> p.
> What's to prevent me?
A diagnostic message, and the wit to read it.
> I do not believe that the compiler is fully > able to prevent me doing this.
The language provides tools to allow the programmer to circumvent the rules if that's what he or she really wants, but makes no guarantees about the outcome. In other words, it believes a programmer who says "trust me, I know what I'm doing". It is, of course, quite possible that a programmer might lie about that.
> Because of aliasing the behavior of C > code cannot be determined in full from source.
foo.c: In function `a': foo.c:5: warning: initialization discards qualifiers from pointer target type foo.c: At top level: foo.c:10: warning: function declaration isn't a prototype foo.c: In function `main': foo.c:11: warning: initialization discards qualifiers from pointer target type foo.c:12: warning: int format, pointer arg (arg 2)
> This code crashes at "*q = ' '" but the compiler fails to detect the > problem.
Get a better compiler, or turn up the warning level on your existing compiler.
<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
In <7loprcF3efbm...@mid.uni-berlin.de>, Robert Latest wrote:
> Richard Heathfield wrote:
> [stuff]
> I'm back on c.l.c after a few years of Python-induced abstinence, > but now I'm writing a few tools that need to be run stand-alone on a > pretty bare-bones platform (Win32, incidentally).
Welcome back!
> Anyway, glad to see you're still here, but I start wondering out of > which zoo this spinoza knucklehead escaped.
On Nov 9, 5:00 am, Robert Latest <boblat...@yahoo.com> wrote:
> Richard Heathfield wrote:
> [stuff]
> I'm back on c.l.c after a few years of Python-induced abstinence, but > now I'm writing a few tools that need to be run stand-alone on a pretty > bare-bones platform (Win32, incidentally).
> Anyway, glad to see you're still here, but I start wondering out of which zoo > this spinoza knucklehead escaped.
Do your homework instead of reading one or two posts. Heathfield is not a C authority nor an authority on programming. Instead, he's some sort of manager who enables and spreads lies and gossip about competent people which through repetition become the "truth" for the Real Knuckleheads.
This is a discussion of a series of solutions to the problem of infix to polish notation. Heathfield has made in fact a grand total of one minor technical contribution to that discussion. This is not a discussion of personalities. Unless you have something to contribute to the topic, please leave.
> > This code crashes at "*q = ' '" but the compiler fails to detect the > > problem. Perhaps there is a compiler that prevents the assignment of a > > const pointer to a non-const but in general the compiler cannot detect > > all instances of this mistake.
> Maybe you should change compiler. > gcc gives a warning even without the -Wall flag:
> const.c:5: warning: initialization discards qualifiers from pointer target type
OK, some compilers generate a warning. In many cases those warnings can be turned off. Whereas in Java and in .Net the status of a noncompliant program is a single data point which is known after each compile. You can still run the code, but both Java and .Net speak "with one voice" about your code. It's "unmanaged" in .Net and this property is a part of the language definition.
Whereas in C, the actual language in use is C(n) where n is some number that is in general unknown.
I'm not saying that isn't a good warning, and I wish MS C had it: it might. And certainly a workgroup can agree amongst itself to use a fixed makefile in which options are standardized.
But note that in the usual case, the workgroup is "managed" by a personality like Richard Heathfield, an enabler, who makes programmers "productive" by forcing them to "compete" with each other. This creates pressure to circumvent the agreed on standards at all times because the job is making the manager look good.
C allows this process to be concealed: to some extent, Java and .Net doesn't.
> Malcolm McLean wrote: > > "Richard Heathfield" <r...@see.sig.invalid> wrote in message > >> The Standard does not actually require a diagnostic message because > >> rightly or wrongly, in C string literals do not have a const > >> type-qualifier. (Wrongly, in my opinion, but they aren't about to > >> change it for my benefit.) Nevertheless, a good implementation will > >> produce a diagnostic message anyway.
> > Const isn't inherently a bad idea. The problem is that it can't simply be > > tacked onto a language that was originally designed without it.
> > Consider, we have a bunch of string literals. We want to sort them. So we > > write a little comparison function to qsort
> > It works as long as C has fast and loose constness rules. Tighten things up > > so that a const can never have its constness removed, and suddenly you've > > tied yourself in knots with syntax and even function design.
> In this case, only because YOU have made a mistake. Had you correctly
Malcolm of course made no mistake, since he was presenting example code in a discussion of how C handles a pathological case. However, it seems that entirely too many posters here are recovering from dysfunctional and lower middle class family systems in which a father, himself treated like shit on the job, took pleasure in humiliating his sons by pointing out various mistakes during their quality time. Heathfield et al. replicate this father in a continual attempt to transform examples of code submitted here in good faith into "mistakes"...in an industry famous for real mistakes that are the fault of management, and not programmers.
> defined the pointers then, since strcmp takes pointers to const char, it > would work without problem.
> I'll let you work out which of the instances of const can safely be > dropped ;-)
> Having said that, I agree that const in C is not too good ecause, as you > say, it was bolted on rather than designed in from the begining. It's > just not as bad as you make out!
OK, so Fat Bastard (Richard Heathfield) is wrong again. He said it was a mistake not to use it in calling tester() with literal strings: yet it's almost useless and as Malcolm points out, Ritchie has spoken against it.
If I used it thoroughly and as intended, I would append const to NEARLY ALL of the formal parameters in the code under discussion, since as a competent programmer I don't define a lot of formal parameters meant to be modified: my functions are for the most part tightly bound functions with read only inputs and one output returned as the function value.
Nonetheless I shall do so. Note that because C is so inchoate a language, actually a set of conflicting languages, this would be "good" C only in some playbooks and not in others.
This is why it was unethical, and quite possibly actionable libel, for Peter Seebach to enable the attacks on Schildt. The attacks presume that there's only one proper C, which is something that programmers whose skills are rusty and don't want to learn modern languages cling to.
> In > <cce29dab-004d-4e77-a379-631bfb94c...@q40g2000prh.googlegroups.com>,
> spinoza1111wrote: > > On Nov 8, 6:05 pm, Seebs <usenet-nos...@seebs.net> wrote:
> <usual Nilges nonsense snipped>
> >> When you declare a "const char *p", you are declaring, not that p > >> is a constant, but that you cannot modify the things pointed to by > >> p.
> > What's to prevent me?
> A diagnostic message, and the wit to read it.
> > I do not believe that the compiler is fully > > able to prevent me doing this.
> The language provides tools to allow the programmer to circumvent the > rules if that's what he or she really wants, but makes no guarantees
I take issue with this childish use of language: "what the programmer 'wants'. What the user 'wants'". In applications programming, correctness and maintainability are what's needed, not satisfaction of desires.
The "credit crisis" alone reveals that what many "rocket science" C programmers in finance "wanted" was to make their boss happy by concealing toxic securities: some with no name and address of the original debtor, and others linked to others in a loop.
Your sloppy language is a coverup of what's really going on: the use of C as opposed to safe languages in business programming in order to conceal fraud. I note that you have no record as an operating system programmer or a programmer of compilers, where the use of C might make sense.
I have to ask you: if you worked for a series of "banks and insurance companies", what the HELL were you doing if you used such an unsafe language to program financial instruments?
> about the outcome. In other words, it believes a programmer who says > "trust me, I know what I'm doing". It is, of course, quite possible > that a programmer might lie about that.
> > Because of aliasing the behavior of C > > code cannot be determined in full from source.
> foo.c: In function `a': > foo.c:5: warning: initialization discards qualifiers from pointer > target type > foo.c: At top level: > foo.c:10: warning: function declaration isn't a prototype > foo.c: In function `main': > foo.c:11: warning: initialization discards qualifiers from pointer > target type > foo.c:12: warning: int format, pointer arg (arg 2)
> > This code crashes at "*q = ' '" but the compiler fails to detect the > > problem.
> Get a better compiler, or turn up the warning level on your existing > compiler.
> <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
In <17ba20c8-7503-4d2a-b2d7-8d99e0bb3...@o9g2000prg.googlegroups.com>,
spinoza1111 wrote: > On Nov 9, 5:00 am, Robert Latest <boblat...@yahoo.com> wrote: >> Richard Heathfield wrote:
>> [stuff]
>> I'm back on c.l.c after a few years of Python-induced abstinence, >> but now I'm writing a few tools that need to be run stand-alone on >> a pretty bare-bones platform (Win32, incidentally).
>> Anyway, glad to see you're still here, but I start wondering out of >> which zoo this spinoza knucklehead escaped.
> Do your homework instead of reading one or two posts.
For once, I agree. Don't judge Mr Nilges on the basis of one or two articles. Read a dozen, chosen entirely at random. That will probably be a fair sample.
<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
spinoza1111 wrote: > On Nov 9, 12:24 am, Flash Gordon <s...@spam.causeway.com> wrote: >> Malcolm McLean wrote: >> > "Richard Heathfield" <r...@see.sig.invalid> wrote in message >> >> The Standard does not actually require a diagnostic message >> >> because rightly or wrongly, in C string literals do not have a >> >> const type-qualifier. (Wrongly, in my opinion, but they aren't >> >> about to change it for my benefit.) Nevertheless, a good >> >> implementation will produce a diagnostic message anyway.
>> > Const isn't inherently a bad idea. The problem is that it can't >> > simply be tacked onto a language that was originally designed >> > without it.
>> > Consider, we have a bunch of string literals. We want to sort >> > them. So we write a little comparison function to qsort
>> > It works as long as C has fast and loose constness rules. Tighten >> > things up so that a const can never have its constness removed, >> > and suddenly you've tied yourself in knots with syntax and even >> > function design.
>> In this case, only because YOU have made a mistake. Had you >> correctly
> Malcolm of course made no mistake,
How would you know? In fact, Malcolm's comparison function was badly broken, but you don't know enough about the language to know that.
> since he was presenting example > code in a discussion of how C handles a pathological case.
It's not a pathological case and that isn't how C handles it, but you're right that it was Malcolm who presented the (broken) example, and one out of three ain't bad.
<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
In <fef4b6b1-db6e-4376-a713-f2e64606d...@i12g2000prg.googlegroups.com>,
spinoza1111 wrote: > Richard Heathfield wrote: >> spinoza1111wrote:
<snip>
>> > I do not believe that the compiler is fully >> > able to prevent me doing this.
>> The language provides tools to allow the programmer to circumvent >> the rules if that's what he or she really wants, but makes no >> guarantees
> I take issue with this childish use of language: "what the > programmer 'wants'.
How nice. Grow up.
> What the user 'wants'". In applications > programming, correctness and maintainability are what's needed, not > satisfaction of desires.
You don't think a programmer wants correctness and maintainability? (I know you're a counter-example, but I'm talking generally.)
<nonsense snipped>
> I have to ask you: if you worked for a series of "banks and > insurance companies",
I've worked for many clients. That does indeed include a string of financial organisations, yes, but it is by no means limited to them.
> what the HELL were you doing if you used such > an unsafe language to program financial instruments?
Because that's what the clients wanted. Like a chainsaw or an electric drill, C is easy to abuse (and may thus be considered unsafe, in the sense that you wouldn't want to see the results of its use by the ignorant or the mentally unstable), but it is a powerful language with very fast implementations. Despite your inability to use it properly, it *can* be used properly, and to do so is not especially difficult.
<usual snippage of material-that-Nilges-is-too-stupid-to-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
Robert Latest wrote: > Anyway, glad to see you're still here, but I start wondering out of which zoo > this spinoza knucklehead escaped.
Mr Nilges is the clc juvenile posting pet. He has spent most of the last year reminding readers of the errata in Herb Schildt's books. His badly written but entertaining rants on personalities and programing occaisionally touch on his limited knowledge of C.
In <4AF7C4FC.C84C4...@bytecraft.com>, Walter Banks wrote:
> Robert Latest wrote:
>> Anyway, glad to see you're still here, but I start wondering out of >> which zoo this spinoza knucklehead escaped.
> Mr Nilges is the clc juvenile posting pet. He has spent most of the > last year reminding readers of the errata in Herb Schildt's books. > His badly written but entertaining rants on personalities and > programing occaisionally touch on his limited knowledge of C.
His badly written rants on personalities and programming also occasionally touch on his limited knowledge of personalities and programming.
-- 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
spinoza1111 <spinoza1...@yahoo.com> writes: > I take issue with this childish use of language: "what the programmer > 'wants'. What the user 'wants'". In applications programming, > correctness and maintainability are what's needed, not satisfaction of > desires.
I'm now completely lost. Every time anyone suggests anything that makes your code more correct or easy to maintain you say that it works in your environment and is maintainable by you. Then, in response to perfectly correct use of the English "want" you come up with this.
As you are prone to throwing philosophy around, I'd suggest these "wants" are instances of Dennett's intentional stance anyway. -- Online waterways route planner: http://canalplan.org.uk development version: http://canalplan.eu
In article <4AF7C4FC.C84C4...@bytecraft.com>, Walter Banks <wal...@bytecraft.com> wrote:
>Robert Latest wrote:
>> Anyway, glad to see you're still here, but I start wondering out of >> which zoo this spinoza knucklehead escaped.
>Mr Nilges is the clc juvenile posting pet. He has spent most of the last >year reminding readers of the errata in Herb Schildt's books. His >badly written but entertaining rants on personalities and programing >occaisionally touch on his limited knowledge of C.
On Nov 9, 3:43 pm, Nick <3-nos...@temporary-address.org.uk> wrote:
> spinoza1111<spinoza1...@yahoo.com> writes: > > I take issue with this childish use of language: "what the programmer > > 'wants'. What the user 'wants'". In applications programming, > > correctness and maintainability are what's needed, not satisfaction of > > desires.
> I'm now completely lost. Every time anyone suggests anything that makes > your code more correct or easy to maintain you say that it works in your > environment and is maintainable by you. Then, in response to perfectly
Actually, I've never said anything like that. When Richard jiggered gcc options to come up with a stream of complaints that the strings passed to tester() in my code to testCase() I said that I'd be happy to add const to all read-only parameters in the code, and this is on my to do for rel 5, along with using Navia and, possibly, gcc compilers to compile rel 5 to see what differs.
I don't like Heathfield in the slightest, and I think he's a nasty piece of work, representative of the worst, most abusive and most unethical software manager. Nonetheless when he made what appeared to be a genuine technical contribution to this discussion, I immediately agreed to incorporating it and identifying Heathfield as the contributor...although the name for him on the Change Record in the code shall be Fat Bastard, since he probably won't want me to use his real name, and it pleases me to call him Fat Bastard ... in view of the destruction and ruin he's wreaked on clc for the past ten years this is mild.
I did point out that const really doesn't accomplish much. I experimented with it on MS C to discover that it's easily circumvented by using another pointer to point to the "const" item; this is a logical consequence of the fact that C presents a von Neumann machine with aliasing and pointers enabled. But another poster showed that more sophisticated C compilers are able to catch SOME aliased references to the pointer declared const, and as a result I'm considering installing gcc.
But, Malcolm McClean has pointed out that const doesn't fix what it purports to fix. It provides nothing like the protection provided by Visual Basic's ByVal or the standard default value parameters of C Sharp. So, I am now wondering whether my time hasn't been wasted by Richard. I did not use const when I was a C "expert" and Malcolm has pointed out that Ritchie doesn't like it.
I think Richard may have raised a red herring in order to appear to be making a contribution and to prove my "incompetence". He's been making claims about my competence in a way that's criminally and civilly libel under the law of his country, the UK, ever since a discussion in 1999 in comp.programming in which Richard's ignorance and low culture were exposed and he conducted a campaign of personal destruction, directed against me, which included utterly absurd claims ("comp.programming not about programmers").
> correct use of the English "want" you come up with this.
> As you are prone to throwing philosophy around, I'd suggest these > "wants" are instances of Dennett's intentional stance anyway.
Before you read advanced material I'd suggest mastering the basics (Copi et al. on informal logic).
You see, "tu quoque" ("you're another") is an ugly fallacy which is the favorite of men in prison and other riff raff: "I'm a thief but so are the big shots".
To establish the validity of an argument based on this fallacy, you must "norm" the behavior that you charge your opponent with. Here, it has to be OK for people to make technical decisions based on what they want, or what they can get away with, for me to be just another wanter who has no claim to any better reasons for technical decisions.
> In > <fef4b6b1-db6e-4376-a713-f2e64606d...@i12g2000prg.googlegroups.com>,
> spinoza1111wrote: > > Richard Heathfield wrote: > >> spinoza1111wrote:
> <snip>
> >> > I do not believe that the compiler is fully > >> > able to prevent me doing this.
> >> The language provides tools to allow the programmer to circumvent > >> the rules if that's what he or she really wants, but makes no > >> guarantees
> > I take issue with this childish use of language: "what the > > programmer 'wants'.
> How nice. Grow up.
No, you grow up, or get out.
> > What the user 'wants'". In applications > > programming, correctness and maintainability are what's needed, not > > satisfaction of desires.
> You don't think a programmer wants correctness and maintainability? (I > know you're a counter-example, but I'm talking generally.)
No, I think 99.9% of programmers want a cushy job. To get something correct and maintainable, you need to force them to work in cooperative groups with none of your office politics, your time- wasting, and your campaigns of personal destruction...whether old- style structured programming workgroups such as have been shown to be successful at NASA (despite NASA's more general culture of normalize deviance), or "buddy system" Extreme Programming.
But if you set them to work separately, and force them to always be what Adorno, in Minima Moralia, called "candidates for posts" (always on probation in at-will employment) then they will do as little as possible, backstab and obfuscate, because you, their incompetent manager (yes, you, Richard) like to make people unhappy.
And that, my dear fellow, is a fault.
> <nonsense snipped>
> > I have to ask you: if you worked for a series of "banks and > > insurance companies",
> I've worked for many clients. That does indeed include a string of > financial organisations, yes, but it is by no means limited to them.
So what else? Pubs?
> > what the HELL were you doing if you used such > > an unsafe language to program financial instruments?
> Because that's what the clients wanted. Like a chainsaw or an electric
Eye roll. Crotch grab. A software system is not a tool. "Tool" is a metaphor.
> drill, C is easy to abuse (and may thus be considered unsafe, in the > sense that you wouldn't want to see the results of its use by the > ignorant or the mentally unstable), but it is a powerful language > with very fast implementations. Despite your inability to use it > properly, it *can* be used properly, and to do so is not especially > difficult.
:-). Seems to me that I am using it properly, and that I've contributed more new code than you ever have, taking the risks you're afraid to take: that the thugs in this group will attack creativity.
You keep repeating yourself, Fat Bastard, but saying "Nilges is incompetent" twice, four times, what ever, doesn't make it true. Wasting our time with your const "red herring" (the false claim that omitting const for a read-only parameter is a mistake and not a matter of taste) shows both incompetence and dishonesty. I agreed to add const to rel 5 just to shut you up and see how it works, but I'm reconsidering.
> <usual snippage of material-that-Nilges-is-too-stupid-to-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
> In > <070c0ad5-24eb-46b2-bdcc-c05bbad21...@u25g2000prh.googlegroups.com>,
> spinoza1111wrote: > > On Nov 9, 12:24 am, Flash Gordon <s...@spam.causeway.com> wrote: > >> Malcolm McLean wrote: > >> > "Richard Heathfield" <r...@see.sig.invalid> wrote in message > >> >> The Standard does not actually require a diagnostic message > >> >> because rightly or wrongly, in C string literals do not have a > >> >> const type-qualifier. (Wrongly, in my opinion, but they aren't > >> >> about to change it for my benefit.) Nevertheless, a good > >> >> implementation will produce a diagnostic message anyway.
> >> > Const isn't inherently a bad idea. The problem is that it can't > >> > simply be tacked onto a language that was originally designed > >> > without it.
> >> > Consider, we have a bunch of string literals. We want to sort > >> > them. So we write a little comparison function to qsort
> >> > It works as long as C has fast and loose constness rules. Tighten > >> > things up so that a const can never have its constness removed, > >> > and suddenly you've tied yourself in knots with syntax and even > >> > function design.
> >> In this case, only because YOU have made a mistake. Had you > >> correctly
> > Malcolm of course made no mistake,
> How would you know? In fact, Malcolm's comparison function was badly > broken, but you don't know enough about the language to know that.
OK, Richard, you're out of this discussion...again. As in the case of Seebach, your technical contributions will not be read or incorporated. If I decide to make read-only parameters const, you won't be credited.
Too many times, you make dishonest points merely to dominate the discussion and make people fear being labeled by you, repeatedly, as "incompetent" in such a way as to dominate the conversation.
This is because you're attacking Malcolm for making a point that doesn't make your case.
I am also investigating your relationship with SAMS to discover whether this publisher is retaining you dominate and destroy clc for business reasons.
> > since he was presenting example > > code in a discussion of how C handles a pathological case.
> It's not a pathological case and that isn't how C handles it, but > you're right that it was Malcolm who presented the (broken) example, > and one out of three ain't bad.
> <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- Hide quoted text -
In <3daccb19-f224-4736-882b-2d9096adb...@o9g2000prg.googlegroups.com>,
spinoza1111 wrote: > Richard Heathfield wrote: >> spinoza1111wrote:
<snip>
>> > Malcolm of course made no mistake,
>> How would you know? In fact, Malcolm's comparison function was >> badly broken, but you don't know enough about the language to know >> that.
> OK, Richard, you're out of this discussion...again.
Wrong. You don't get to choose who participates in Usenet discussions, unless you're a moderator. And this is an unmoderated group.
> As in the case > of Seebach, your technical contributions will not be read or > incorporated.
Your problem, not mine.
<nonsense snipped>
> This is because you're attacking Malcolm for making a point that > doesn't make your case.
I'm not attacking Malcolm. I'm pointing out that the code he posted is broken - which it is.
> I am also investigating your relationship with SAMS to discover > whether this publisher is retaining you dominate and destroy clc for > business reasons.
Nice one. While you're at it, check out MI5.
<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
> But, Malcolm McClean has pointed out that const doesn't fix what it > purports to fix.
He hasn't. At least he failed to say what he thinks it purports to fix, so it is hard to say for certain. Malcolm does not like const and I have stopped trying to get from him exactly what it is he does not like. In fact, Malcolm has a few interesting views about C which I think you should be wary of accepting before hearing both sides of case.
> It provides nothing like the protection provided by > Visual Basic's ByVal or the standard default value parameters of C > Sharp. So, I am now wondering whether my time hasn't been wasted by > Richard. I did not use const when I was a C "expert" and Malcolm has > pointed out that Ritchie doesn't like it.
This is one of those memes that won't die. Malcolm supplied no reference, but I suspect he refers to a letter sent to the X3J11 committee about type qualifies. It had no title (as far as I can tell) but starts "This is an essay on why I do not like X3J11 type qualifiers".[1]
First, this refers to a pre-1989 draft and mainly concerns things that were subsequently dropped from the language. Second, the two biggest criticisms are for noalias (dropped entirely) and about the meaning of a pointer to a const qualified objects (corrected in the final standard). I.e. both of these were sorted out before the first ANSI standard was released twenty years ago.
So what does Ritchie think of const? Towards the end of the paper we find some recommendations. There he says:
"Const has two virtues: putting things in read-only memory, and expressing interface restrictions. For example, saying
char *strchr(const char *s, int c);
is a reasonable way of expressing that the routine cannot change the object referred to by its first argument. I think that minor changes in wording preserve the virtues, yet eliminate the contradictions in the current scheme."
So const has virtues that should be preserved by corrections to the draft. Further on, he suggests that string literals should have the type "const char[]". I regret that this was not taken up (it would have made some old code undefined) but suggesting extended use of the keyword does not sound like the words of someone who does not like const.
Of course, he may have changed his view since then. If so, I hope Malcolm with post a reference. If Denis Ritchie has grave concerns about const (as it now stands) I certainly want to read them.
Keith Thompson <ks...@mib.org> wrote: > Nick Keighley <nick_keighley_nos...@hotmail.com> writes: > [...] > > you could use a macro and diffuse all these arguments
> > #define TRUE -1
> > I quite like the grammer driven approach as an idea.
> I think you mean
> #define TRUE (-1)
> And if I saw that, I'd still wonder why the author used -1 rather > than 1.
I wouldn't: it's obviously because he started out on a variety of MS Basic, rather than on C, a saner version of BASIC, or some other language altogether.
Moi <r...@invalid.address.org> wrote: > On Sat, 07 Nov 2009 06:21:14 -0800, spinoza1111 wrote:
> > Sloppy English won't make your case. How can a program be "error prone" > > for the "reader"? Do you mean "conducive to misreading?" That's > > precisely what my style is not.
> Since you seem to be very good at learning new languages, I suggest you > put your writings in Dutch, then.
Mijn hemel, nee, liever niet zeg. Dat soort aarsfladder, en dan ook nog in steenkolen-Nederlands? Dan liever in Lojban. Hij lijkt me een typische spreker van Lojban.
On 2009-11-09, spinoza1111 <spinoza1...@yahoo.com> wrote:
> No, I think 99.9% of programmers want a cushy job.
Hmm.
You know, I really, really, want to disagree with this statement, but...
All I can say for sure is, I've met enough programmers who want other things more that I think the number's gotta be lower than that. I think I disagree with this as written, but if you'd said 90%, I'd probably just sigh.
> To get something > correct and maintainable, you need to force them to work in > cooperative groups with none of your office politics, your time- > wasting, and your campaigns of personal destruction.
Total agreement. Leave your egos at the door, people.
> ..whether old- > style structured programming workgroups such as have been shown to be > successful at NASA (despite NASA's more general culture of normalize > deviance), or "buddy system" Extreme Programming.
I've heard some great stuff about XP, but haven't been able to try it. We have been forced to settle for an aggressive and thorough review process, and a lot of emphasis on a corporate culture which rejects attempts to "fix blame" and focuses instead on solving problems.
> But if you set them to work separately, and force them to always be > what Adorno, in Minima Moralia, called "candidates for posts" (always > on probation in at-will employment) then they will do as little as > possible, backstab and obfuscate, because you, their incompetent > manager (yes, you, Richard) like to make people unhappy.
I'm not convinced of this. My coworkers and I are all, I think, technically "at-will" employees, but we have justified confidence, based on previous experience, that management will generally back us and support us reasonably, and we react accordingly.
> Seems to me that I am using it properly,
You might want to read up on the Dunning-Kruger effect. It's very risky to try to evaluate your own competence without a LOT of data points and samples. In particular, if you find yourself thinking you're better at something than a lot of other people, and they don't think you're good at it, that's often a warning sign.
> Losing your temper won't make your case.
Hah! Today I am using an irony meter that was tested out on the public morality policy claims of politicians who were later busted having anonymous sex in order to obtain drugs, and you didn't even make it out of the yellow zone.
>> On Sat, 07 Nov 2009 06:21:14 -0800, spinoza1111 wrote:
>> > Sloppy English won't make your case. How can a program be "error >> > prone" for the "reader"? Do you mean "conducive to misreading?" >> > That's precisely what my style is not.
>> Since you seem to be very good at learning new languages, I suggest >> you put your writings in Dutch, then.
> Mijn hemel, nee, liever niet zeg. Dat soort aarsfladder, en dan ook > nog in steenkolen-Nederlands? Dan liever in Lojban. Hij lijkt me een > typische spreker van Lojban.
Which translates rather wonderfully to "English" as "My sky, no, rather do not say. That type aarsfladder, and thus still in steenkolen-Nederlands? Then rather in Lojban. He seems a typical participant of Lojban me."
Gotta love Babblefish.
-- 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
On Nov 9, 11:21 am, Seebs <usenet-nos...@seebs.net> wrote:
> I've heard some great stuff about XP, but haven't been able to try it. > We have been forced to settle for an aggressive and thorough review > process, and a lot of emphasis on a corporate culture which rejects attempts > to "fix blame" and focuses instead on solving problems.
I feel compelled to quote this for emphasis. Placing blame is generally counter-productive and only results in leaving everyone involved bitter at the end. Focusing on solving the problem rather than trying to point fingers is much more productive. I've worked at companies from both extremes, and I can't describe the amazing difference in morale, efficiency, and overall quality there is from setting aside blame in favor of getting the job done as well as possible.
It's a shame this newsgroup has deteriorated into so much finger pointing and so little problem solving. This whole finger pointing crusade of spinoza111's is just another instance in the downward spiral. I don't bother coming here for insights anymore, just to watch and enjoy the squabbling. ;-)
On 2009-11-09, Julienne Walker <happyfro...@hotmail.com> wrote:
> It's a shame this newsgroup has deteriorated into so much finger > pointing and so little problem solving. This whole finger pointing > crusade of spinoza111's is just another instance in the downward > spiral. I don't bother coming here for insights anymore, just to watch > and enjoy the squabbling. ;-)
The irony is beautiful. Because he believes it is wrong to attack persons rather than rationally disputing claims, he has spent a couple of years frenetically pursuing any and all people he believes to be part of the "campaign" he imagines against Schildt, flinging derogatory language and insults constantly at them.
It really is sort of amazing. I keep reading in the hopes that some day he'll offer some kind of factual claim to support one of his rants, but it doesn't seem to be on the table.
I do think you have a point about the problem solving. I should post some puzzles or something.
ralt...@xs4all.nl (Richard Bos) writes: > Keith Thompson <ks...@mib.org> wrote:
>> Nick Keighley <nick_keighley_nos...@hotmail.com> writes: >> [...] >> > you could use a macro and diffuse all these arguments
>> > #define TRUE -1
>> > I quite like the grammer driven approach as an idea.
>> I think you mean
>> #define TRUE (-1)
>> And if I saw that, I'd still wonder why the author used -1 rather >> than 1.
> I wouldn't: it's obviously because he started out on a variety of MS > Basic, rather than on C, a saner version of BASIC, or some other > language altogether.
It could also be someone used to BCPL. Not likely in this particular case but, given C's ancestry, there are probably some people who think that way because of BCPL. For the record, 1 had taken over even in B.