Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mav3rick
on Dec 17, 2020
|
parent
|
context
|
favorite
| on:
Getting started with C
There should only be one way to succeed. Returning 0 for success makes complete sense. You can add layers of macros or enums to sugar coat this but retuning 0 for the success case makes complete sense
bitwize
on Dec 17, 2020
[–]
Yes, but if you use "magic constants" in your code, you will flunk code review in any halfway competent shop.
Always use the constant symbols.
piker
on Dec 17, 2020
|
parent
|
next
[–]
Flunked for returning 0 from main() in C? Not sure that's a competent shop.
mav3rick
on Dec 17, 2020
|
parent
|
prev
[–]
Have you seen any syscall implementation?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: