S
Seebs
Bone up on compiler optimization and tail recursion. I'm not gonna
explain it to you.
It just seems non-obvious to me that always returning a value is necessarily
better than not having to return a value.
Do you own Sethi Aho et al 2nd ed.?
Probably.
Don't even presume to lecture me, kiddo.
You posted code, you got feedback.
Your consideration for others
is on display in your treatment of Schildt.
I would never *dream* of giving you advice based on the theory that you were
interested in showing consideration for others. I'm telling you how to reduce
the likelihood that people will think you're an idiot. You can pursue that
out of pure self interest, no worries!
You have a disturbing tendency to lapse into sloppy English and
corporatese whenever you want to stop thinking, and when this harms
other people, it needs to stop.
Corporatese? I don't think so.
What on earth is "the reader's flow?"
People performing tasks such as "reading diagnostic messages" or "skimming
output from code" tend to perform them more reliably and more quickly when
the format and structure of the material is conducive to maintaining a
state called "flow".
http://www.eric.ed.gov/ERICWebPorta...&ERICExtSearch_SearchType_0=no&accno=EJ525775
Basic familiarity with the literature: Always a plus.
Haven't you run the latest edition?
These comments were all on the original edition. You asked what benefit
a format string might have, I gave an example.
It does this visually on any
monospace window by putting a dollar sign under the point at which the
error is discovered...although now that I think of it, it's probably a
mistake on my part to assume monospace output.
Not an unreasonable one, though.
No, it's organizing material for easy retrieval in a modern editor
with intellisense.
It still doesn't work.
He's not the originator. "Systems Hungarian" was already in use in IBM
when he was still in Hungary helping to destroy socialism as a punk
kid who needed a kick in the ass. It is in fact mentioned in a book by
Richard Diebold published in 1962.
Perhaps, but he's the reason people mostly adopted it -- and while Systems
Hungarian may well have been useful in 1962, it's been worthless since the
80s or so in nearly all languages.
Actually, for trivial algorithms, I can.
Probably not for this one. (If you're on x86, for instance, consider
that there's a single instruction for this operation, which is likely to
get used if it's a good fit. There's a reason compilers often have built-in
implementations of common library functions.)
I didn't pay a dime for Microsoft C++ Express.
No one said you did. I was referring to the "Lot Of Useless Crap". You
already got the Lot Of Useless Crap. It's there. You might as well use
it.
Yes. The confusion is here created not by me, however, but by C's lack
of a boolean type.
One of the things that fluent speakers learn is that beyond the raw formal
lexicon of a language, it will usually have idioms. C has had idioms for
true and false since 1978, and it would make sense to stick with those
idioms. (Or, if you prefer, you could always use the boolean type, since
there is one in C99.)
This is childish. "I care about all sorts of useless shit like what
main() returns but not about interpersonal decency, nor elegance I
didn't invent".
Oh, I'm all for elegance, regardless of who invented it, but -1 isn't
elegant.
You see, C lacks Boolean values,
Not since 1999 it doesn't.
But even in 1978... Let's consider the question.
If we are to define "false" and "true", what should they be?
Obviously:
if (false) {
}
should not execute the contents of the block. How about... 0?
Okay. So what's true? "!false" is true. What's !0? 1. true is 1.
and -1 is more
visible than 1: more readable: more elegant, and, in a twos complement
system, it uses the literary technique of "evocation", for it evokes
in the intelligent code reader a vision of all ones (and it's more
visible at what we used to call core dump time, and what is now The
Time of Blue Screen of Death).
Your continued assertions that you are the gold standard of the "intelligent
reader" are unsupported.
However, it gets a bit deeper than that.
There are many functions and APIs which have standardized on using negative
values to indicate *errors*. Because of this, readers who are experienced
with C will usually regard a "-1" as an error indicator. Your theory that it
would make sense for it to be regarded as a particularly idiomatic "true"
is fascinating, but it doesn't match the real world.
Not in any substantive way.
Your code has a buffer overrun that exists because you didn't pay attention
to the well-established idioms that allow experienced programmers to avoid
buffer overruns.
That's pretty substantive.
My goal was to get something coded and see
how you behave in a structured walkthrough
Ahh, that won't happen. I'm not about to put real effort into this stuff.
I view you as an amusing kook, no more. The moment I saw multiple responses
from you continuing to assert your tinfoil hat theory about how the
standards process worked, without even ONE bit of supporting evidence, I
gave up. I have not taken you seriously since, nor do I now.
Words, my lord: words words words. But that's not the problem. "In
context" is meaningless corporatese.
No, it isn't.
It's odd, because you keep talking about what users would expect, but you
appear to have carefully avoided learning anything about how users form
their expectations.
The "user" (sigh). Sloppy English: because in a structured walkthrough
users have no place, no more than managers. You invoke "the user" as a
deus ex machina: a Lacanian phallus. But literally, that's the person
who as you say needs to be innocent of the details!
Lots of handwaving, but you haven't addressed the point. The purpose of the
code is to be used. The person using it does not care about the internal
implementation; that person's sole interest is to get an infix expression
converted to RPN, for reasons we are not privileged to speculate on.
If you'd learn how to write properly, which you can't,
*snicker*
Bored now, gonna go change the litterbox.
I was hoping you'd stay fun longer, but you've actually really dropped off
in hilarity lately, such that I'd rather go deal with trash night. (One of
the few holidays nearly all Americans still revere.)
-s