4 ms·
With executables you know they have one and only one entry point that conforms to the OS’s process execution conventions, which is a useful property to have be
by layer8 4y ago
With executables you know they have one and only one entry point that conforms to the OS’s process execution conventions, which is a useful property to have be immediately apparent. Libraries can be seen as either a superset (any number of such entry points, most often zero) or as the separate category of binaries having no such entry point.
In the world of client-side rendering, one could ask a somewhat similar question of why HTML and JS files are a different thing, and why you can’t just load a JS file to run your SPA in a browser.
- charcircuit 4y agoYou could just error out if you tried to run something without a main function.