R
Rick C. Hodgin
The whole lifestyle which enables you to write programs is wasteful compared
to living in the wild.
YES! You get it! People are what's important. Everything that God made in
creation was made for people, for their benefit, to bring glory to Him. And
it is exactly that ... He created things for us to use, not that they be
wasted, but that they be used to make us better able to help one another, to
serve Him, and not necessarily in that order.
If you don't want to be wasteful, don't drive a car, don't consume anything
that was produced more than 20 miles from where you live, etc.
I don't want to be wasteful in my software's memory consumption. I always
set it to pack structures to single-byte alignment, and I don't employ the
solution you proposed which forces lots of N-length data structures when the
actual source code on each line might be an average of N/16 in real length
(because the one necessary long line mandates that all of the other much
shorter lines consume that much as well).
You're talking about wasting *bytes* on a machine whose RAM is measured in
*gigabytes*. Moreover, those bytes are not permanently wasted; they are only
briefly occupied, and then released and re-used for something else.
Yes. It's an unnecessary feature with Joe's compound literal solution. I
don't understand why you wouldn't prefer Joe's solution, which does not
waste anything, to yours, which wastes much? They both ultimately accomplish
the same thing in this case (where the string lengths of the literals are
not changing, just some of some of their contents).
This "relative waste" is less, relatively, than the scraps that remain on
your plate at dinner, probably even if you lick the plate "clean".
Yes. That's why I used the word "relative" ... because it is relative. In
this case it's relative to Joe's solution, which is not at all wasteful.
Except that it needs a compiler for the C99 dialect, which is larger, written
to a standard which almost tripled the page count compared to C90.
That's a minor issue because a C99 compiler exists, and I believe I can link
the output object file into my own, being as it's only data. If not ... I
still have the solution I've been using for the past few weeks.
Best regards,
Rick C. Hodgin