Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are you trying to dispute the fact that `main()` is THE entry point for any C program? I'd be interested in hearing a more comprehensive explanation.


To some extent, _start is (https://blogs.oracle.com/ksplice/entry/hello_from_a_libc_fre...), so you can make a working program that has no main(). And in general entry points are a quirky land heavily dependent on OS and compilation stack.


A C program starts at the function "main", what you're discussing here is beyond the scope of the C language. C without the libc or any other form of runtime is not standard C.

I'm not trying to nitpick but I'm worried newcomers to the language might be misled by your comments, the things you're talking about are not a concern for most coders unless they have to do things like low level embedded code, bootloaders and things like that. And then your entrypoint won't be "start" anyway, it'll be the reset vector or some lower stage jumping to a specific address for instance.


Sure, I'm only trying to criticize the idea of learning language from error messages triggered by invalid (due to standards) input, as they directly take you to implementation details and other dirty stuff.


> I'm not trying to nitpick but I'm worried newcomers to the language might be misled by your comments

I'd better not mention the IOCCC then.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: