Re:Main is usually a function, so when is it not? (2015)
by microcolonel on Sunday September 10, 2017 @03:30PM
(#15213866)
I like to start with the assembler, then just tell people that high level languages are fancy assemblers. Some of them restrict you to using the designer's favourite macros, some of them allow you to build on highly general tools at approximately the lowest level, but ultimately all computer programming languages are fancy macro assembler syntaxes.
[ Parent
| on HN ]
Re:Main is usually a function, so when is it not? (2015)
by tomjakubowski on Sunday September 10, 2017 @05:35PM
(#15214424)
This is an OK mental model until a wholly compliant C or C++ compiler blows it all to smithereens with an optimization exploiting UB.
You gotta write C or C++ for the abstract machine defined by the standards. Thinking about C in terms of some concrete assembly language or architecture can be problematic.