Out-of-bounds access and UB

F

Flash Gordon

Mark said:
Containers are data structures that are used to organize storage.
Typical containers are vectors, tables, lists, hash tables, etc. [snip]
As you know, those structures are used daily by any serious C
programmer.


Erm? I've programmed C for nigh on 15 years now and rarely use
complications of the type you describe. Are we talking the same
language?

No, I am sorry. We use different languages. As your friend "Flash
Gordon" in this same tyhread, that says:

"I've spent complete years without using vectors, tables, lists, hash
tables, etc. I used double buffering and arrays, but nothing involving
any complex data structures."

You use a subset of C tailored for people that do not want to use
a lot their brains.

No, I use the parts of C appropriate for the problems I am solving. For
solving algebraic problems I use the maths libraries, for simple comms
work I often use double buffering which is simple and efficient (the
comms I worked on just needed the latest message of any given type, so
writing to one buffer whilst reading from a second was perfectly
adequate) etc.

Fo other jobs I have used linked lists, and even implemented linked
lists in assembler where I really did need to use every trick in the
book to get the code as fast as possible whilst solving a problem that
could not be efficiently solved without linked lists. I also told those
in charge that they had chosen the wrong processor and if they had read
their own analysis of the processing requirements they would have known
this, but it was far too late by the time I became involved.
C is for dummies, C++ is for real programming, as everybody
should know by now. C should be kept in the basement and made
obsolete as fast as possible. Any discussion of real programming
and the real programming needs of people in 2004 should disappear
in favor of endless discussions about whether or not to use
scanf/fgets, etc.

If that is what you believe then comp.lang.c++ is just down the hall. In
the mean time I will continue to use BerkeleyDB which is (I believe)
mainly written in ANSI standard C as a back end for a product used by a
large amount of the construction industry in the UK which is also
written largely in ANSI standard C whilst using OO languages for the GUI
front end, Perl and sh for scripting and any other language or tool
that is appropriate to the job I am doing.
 
D

Dan Pop

In said:
Not so. Though C is usually a compiled language, there could be C
interpreters.

There *are* C interpreters.
So C source code could be run on a C interpreter.

Nope, it could be interpreted on a C interpreter.
Besides, C source code has behaviour when it is being compiled (or
interpreted).

It's actually the result of the compilation or interpretation that has
behaviour. C source code is a mere piece of text.

Dan
 
D

Dan Pop

In said:
No, I am sorry. We use different languages. As your friend "Flash
Gordon" in this same tyhread, that says:

"I've spent complete years without using vectors, tables, lists, hash
tables, etc. I used double buffering and arrays, but nothing involving
any complex data structures."

You use a subset of C tailored for people that do not want to use
a lot their brains.

He uses whatever he needs to get the job done. Can you *prove* that any
of his programs would be more efficient if it used fancier data
structures?

It's been 12 years since I've used a binary tree the last time. In the
meantime, the most complex data structure I *needed* to use was an array
of structures. And I suspect that many programmers use linked lists only
in their homework assignments.

Anyway, if I needed something more complex, I wouldn't trust *anything*
implemented by you. Of all the people involved in this discussion
(except Mark McIntyre) you appear as the one least inclined to actually
use his brain.

Dan
 
K

Keith Thompson

jacob navia said:
C is for dummies, C++ is for real programming, as everybody
should know by now. C should be kept in the basement and made
obsolete as fast as possible. Any discussion of real programming
and the real programming needs of people in 2004 should disappear
in favor of endless discussions about whether or not to use
scanf/fgets, etc.

Sarcasm really doesn't work well on Usenet. I think you're trying to
parody what you think the rest of us believe, but you're not doing it
very well.

If you're interested in having a conversation (assuming that what you
have to say is topical), just tell us what you believe. Don't
misrepresent everyone else's position; we can do that just fine
ourselves. :cool:}

This newsgroup is about the C programming language. If you want to
discuss something other than the C programming language, nobody will
stop you from doing so in an appropriate newsgroup.
 
R

RoSsIaCrIiLoIA

I've spent complete years without using vectors, tables, lists, hash
tables, etc. I used double buffering and arrays, but nothing involving
any complex data structures.

programming == to deal with arrays(and *bounds* of arrays)and loops
or programming == to deal with call functions writed from others
?
 
F

Flash Gordon

programming == to deal with arrays(and *bounds* of arrays)and loops
or programming == to deal with call functions writed from others
?

Programming as in writing the entire system. Sometimes on a project on
my own, sometimes with other more junior staff whose work I have to
review, sometimes with more senior staff (whose work I have also had to
review) and sometimes with people at the same level.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top