On 12/17/24 7:17 PM, Christian Schulte wrote:
> Thank you very much. That's indeed what I was looking for. Those
> undefined behaviour pitfalls. This just does not exist in the Java
> Virtual Machine specification - or - when something was not quite clear,
> the next specification version just clarified things and the
> specification got updated accordingly. Just like when the meaning of the
> volatile keyword got reworked/changed. Stopped following Java evolution
> after the acquision by Oracle due to the way fundamental Java principles
> got broken. Sad story. 27 years of Java experience to throw away now.
> Just glad there is C.
>
You've been given very good advice.
C is very old and has changed a lot since it was invented.
There's been a harsh tension between conceptual purity and ugly engineering,
concepts from high level languages and preserving the power of the language.
It still manipulates addressable bits on a particular hardware platform.
Discipline beyond that is entirely up to you.
Suggestions for less stressful C:
Learn the common idioms which protect against the simple
fatal errors - overruns, null pointers, off-by etc. immediately.
Pointer scope control is vital.
Code sprawl conceals many problems.
Old paraphrase: "Show me your code and I know nothing
Show me your data structures and I know exactly what you can do"
Knuth? Wirth? I forget.
good luck,
geoff steckel
No comments:
Post a Comment