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

For the same reason as in other languages (e.g., Perl, bash) with (effectively, in Perl's case) an explicit end-if keyword: so that you don't need a whole bunch of #endifs at the end of your conditional, one for each #if or #else … #if.

C itself doesn't need this, because you can write `else if …` without needing to put another layer of braces around the subordinate `if` statement.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: