C
Chris Dollin
Richard said:Yup all very C-like.
Was somebody asking for /C-like/ GCed languages? And what does "C-like" mean,
in the era before C?
Richard said:Yup all very C-like.
Richard said:As is smearing ketchup all over your printouts I'm sure.
Chris Dollin said:Was somebody asking for /C-like/ GCed languages? And what does "C-like" mean,
in the era before C?
Chris Dollin said:I'm not. I really do mean that "interpreting assembler" is a
reasonable thing to do in some circumstances, and gave a clue
in the usual place. Try thinking of a /constructive/ reason.
Richard said:In what out of the way instances would interpreting assembler mnemonics(assembler
here, not the opcodes) be seen as a suitable need for including GC in C?
Richard said:We are talking about GC for C. Not for Lisp. Not for Algol.
There was no need and no desire for GC in C.
It would be like hanging an anchor off the back of a skateboard.
Richard said:In what out of the way instances would interpreting assembler mnemonics(assembler
here, not the opcodes) be seen as a suitable need for including GC in C?
In what out of the way instances would interpreting assembler
mnemonics(assembler here, not the opcodes) be seen as a suitable need
for including GC in C?
Ben said:I don't claim that this is the first paper on GC, just that it
pre-dates C. There are dozens of papers about GC from the 60s and DMR
cites 1969-73 as the key design time for C.
Keith Thompson said:[...]Richard said:There is no multibit boolean type, you are erecting straw men and
knocking them down yourself. The programmer can use his own with no bits
wasted if he so chooses.
Can you clarify that statement?
I'll ignore bit fields in the following; note that bit fields can only
be members of structs or unions, so they're not useful if you want to
declare single object.
All C types are multi-bit. Every C object has a size that's a whole
number of bytes, where each byte must be at least 8 bits. If you
declare an object of a boolean type, whether it's C99's _Bool or
soemthing you've defined yourself, that object must occupy at least 8
bits. Note that C doesn't have zero-sized objects.
(This "waste" of space isn't a problem in practice; using only a
single bit would typically require much more code to access it than
the data space you'd save.)
I see no straw man argument in what santosh posted above.
If you think that a programmer "can use his own [boolean type] with no
bits wasted if he so chooses", please demonstrate how you'd declare
such a type.
Pascal can use only 1 bit for a BOOLEAN and only the needed bits for aDo you have an example of a language with a boolean type which will
store the boolean in a location smaller than a byte?
How would it save resources? A boolean type smaller than char would
require more resources to implement and at run time. How would it make
coding any prettier?
An array of Bool could save considerable resources, typically 87.5%,
if implemented as a bit-array. There would be implementation issues in
C however as a bit wouldn't be directly addressable.
Bart
Bart said:An array of Bool could save considerable resources, typically 87.5%,
if implemented as a bit-array. There would be implementation issues in
C however as a bit wouldn't be directly addressable.
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.