Pascal vs C, again (was: Pascals Origins)

gaynor at topaz.UUCP gaynor at topaz.UUCP
Tue Jul 22 15:35:39 AEST 1986


On using flags to simulate breaks, if a flag is not specifically
called for, I'ld rather use a break statement too.  Especially if the
amount of work it takes to do the book-keeping for a flag comes near
that of the unit of work.  In the long run, if I have a choice between
a program that runs 3 times faster than another, and they are both
quality code, not hard to figure which one'll get picked.  I guess the
point inadvertantly obscured in my first response was when you don't
got, make do without (or at least it's possible to do so).

On using unconditional branches to simulate breaks, the professors
here at RU have figured out an ingenious method to eliminate them
from student's code.  Microneurosurgery.  We are not physically
capable of typing the required string of characters - g... uh, go...,
um...  You know, a 'g' followed by a 'o', and then a 't', ...

> True, except it is quite common for a search test to produce a
> 'no-match' result very quickly most of the time, and to always take
> a long time to come up with match. The 'match' is the repeated test.
> Your point is well taken though.

Common indeed, but not the general case.  Your point is well taken
too, as recently I've read a little on Snobol's pattern matching.

On controlled evaluation of boolean operands, you can ALWAYS pull the
stunt off with the introduction of temporary booleans or duplicated
code.  Posting the proofs will surely draw fingers to N keys, hence
they're ommitted.  I wouldn't be caught dead coding any of those
transformations, though.

On flow of control, in general.  I haven't quite made up my mind on
all the issues, but Pascal is definitely lacking in some areas where C
is not.  This sentiment was lost in my original response.

> > Do your homework BEFORE posting.  People are watching you, and
> > paying for it.
>
> Sorry, I don't feel that you have shot me *that* full of holes. I do
> regret the posting, though, because it was essentially a negative
> contribution. Must have been in a bad mood.

I apologize for that last, it was definitely uncalled for.  Them's
fighting words...

Silver  {...!topaz!gaynor}



More information about the Comp.lang.c mailing list