On 12/18/24 06:46, Geoff Steckel wrote: > 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.
Acknowledged. > C is very old and has changed a lot since it was invented. It's all still either von Neumann or Harvard. C is just a portable abstraction to writing machine code directly and it does a great job about it. > It still manipulates addressable bits on a particular hardware platform. > Discipline beyond that is entirely up to you. This one I cannot comment due to lack of experience with C. > > 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. That's exactly what James Gosling et. al. did a very good job about abstracting all of this by inventing Java (the language and the machine specification). That's pretty much why a lot of businesses adopt Java to replace centralized COBOL mainframes in favor of decentralized Java cluster nodes. Oracle, IBM and such know they will be able to make money out of it for decades to come, of course. They just shouldn't have crippled it. > > good luck, > geoff steckel > May the forth be we with you. Thanks. Nice one. -- Christian