125 lines seems fairly 'behemoth' for a hello world C program to me. This for example is a hello world for sdl:
#include <SDL/SDL.h>
int main(int argc, char *argv[]) {
int gogogo = 1;
SDL_Event event;
SDL_Init(SDL_INIT_EVERYTHING);
SDL_WM_SetCaption("Hello World! :D", NULL);
SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE);
while (gogogo) {
SDL_WaitEvent(&event);
if (event.type == SDL_QUIT)
gogogo = 0;
}
SDL_Quit();
return 0;
}https://www.badprog.com/c-sdl-simple-directmedia-layer-hello...
Because all of the platform-specific code is offloaded to the library and compiled in. It's still there, hidden behind the abstractions.
Re:Examining Windows 1.0 Hello.c
by billforsternz on Monday May 25, 2020 @07:14PM
(#23305875)
No, at the time it did seem monstrous and barbaric to need 125 lines for hello.c, when 5 or 6 was quite properly considered the norm. "Behemoth" is a relative term in this case.
Edit: In the decades since nothing has changed in my mind. The messy Windows boilerplate code that made up the other 120 lines or so should have been refactored architecturally and hidden by a framework, API call, something, anything.
Re:Examining Windows 1.0 Hello.c
by CyberDildonics on Monday May 25, 2020 @06:52PM
(#23305735)
No, windows did not require a 125 thousand line program to display hello world.
Re:Examining Windows 1.0 Hello.c
by NCommander on Monday May 25, 2020 @09:58PM
(#23306752)
Even for Windows 1.0, I can see ways to cut this thing down to size. The point though is that this is what MSFT actually included in the SDK, and I remember reading about in "Programming Windows" and other sources.
It just took me a few years (or maybe decades) from reading about it to actually try it.
The question was serious; the repercussions, severe; the message, received.
Re:Examining Windows 1.0 Hello.c
by billforsternz on Monday May 25, 2020 @07:53PM
(#23306108)
Very nice, grace under pressure. Upvoted, along with the original question.
Thanks!
Should that have been "125k line"? Not to get too pedantic, but the units seem needful for "behemoth".