It would to some compiler authors. (who sometimes
have a different
reality than you and I do)
:-)
(I'm a compiler writer)
Good I need a Free Compiler ... OH wait you may want $$$.
In some cases... my PC/DOS compiler is free (and I've been known to
give embedded tools to people with an interesting project).
I like the left to right idea A + B -> C
To each his own - I'm very fond of APL which works that way except
that it runs right to left.
I always wanted to implement the "comes from" operator in one of my
tools but never did...
A long debated
viewpoint - but I think a better solution would be to
emit diagnostics when such conditions are found - the problem is, although
it's simple to detect with simple variables, the use of pointers or
function calls with side-effects can make it impossible to detect such
situations. In this respect, C is like assembly - You have to know what
you are doing and avoid these traps. Perhaps the real solution is one
of education.
But at least with the older C you could find your FEET to shoot.
For humor check here.
http://www.uwsg.iu.edu/usail/library/humor/shoot.foot.html
Readability of a program is a reflection of the programmer, no matter what
the language - good programmers can write very readable code in an
unstructured language, while bad programmers will continue to write
incomprehensible spagetti no matter how "cutting edge" the tools - Like
any art form it flows from the human, not the tool.
Absolutely -
even standardized C allows for may implementation dependant
aspects. This is a necessary evil due to the nature of a very widely
accomodating portable language.
Portable only if you assume BYTES are 8 bits (unsigned) now days.
I've written code for non-8-bit byte machines, and also lots of code
which wouldn't like such an environment - In those cases, I know that
all likely targets of the code will be byte oriented.
It's amazing how often this comes up as an argument that C is non-portable,
It's like saying your famly sedan is not a general purpose automobile
because it cannot operate on a road with a 3-foot width - yet people
drive these cars all over the country (many countries) never knowing how
restricted their vehicles are. People write plenty or portable code relying
on at least 8-bit bytes every day.
I have ported my C compiler to (at least) 12 different processor famlies,
ranging from very limited architectures to rather complex and powerful
processors - Yet I use the same front end, and 90+% of code written for
one processor will compile (and run) without modification on the others.
And a very high percentage of that code will compile under other vendors
toolsets with minimal to no changes. My C compiler itself, certainly a non-
trivial program compiles under itself, and several other vendors toolsets
encompasing widely varying architectures with no changes, and not a single
line of conditional compilation.
Like readbility, portability is a reflection of the programmer, with the
caveat that it will be influenced by the requirements.
Any language
of significant power allows you to hang yourself. The trick
is knowing how to handle the rope - my early computing history involved
more assembly language than anything else, and thinking from that
perspective, I have no problems understanding and avoiding these details.
It also helps that I know very precisely what code my compiler will generate
for various constructs. - and yeah, at times in "quick and dirties" I've
coded stuff invoking undefined behaviour knowing what to expect from my
own toolset (ducking).
So is the languages the problem or the hardware for clean coding?
Neither - the answer is "the programmer".
Many attempts have been made over the years to develop languages which
force the programmer to be "good". But programming is an art, and an art
cannot be synthisized. These efforts simply force unnecessary constraints
on the real artists, and provide another forum for the bad ones to prove
that they produce a mediocre work.
And just what is reasonable memory size anyhow ...
How much fuel will you need for the trip?
(Kinda hard to answer without parameters isn't it).
An AVR1200 with 1K of program storage and NO RAM (only
the CPU registers as temp store) is excessive for some
tasks - an ARM9 with 1024MEG is limited for others (although
I personally can't think of many). I do a lot of my DOS code
in 64K "tiny" memory model (ImageDisk for example).
But we do digress from Vintage Computing...
Dave
--
dave06a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools:
www.dunfield.com
com Collector of vintage computing equipment:
http://www.classiccmp.org/dunfield/index.html