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

Pretty much. The mere existence of cdecl(1) says a lot about the simplicity of C's type declaration syntax.


It's unfortunate that the simple (and easy) underlying principles are not well known. See my other comment.

The bigger reason why recent languages have different declaration syntax is to avoid the need to carry a symbol table during parsing, and to avoid the need to parse all files serially instead of independently. Because to recognize a declaration the parser has to know which words correspond to types in the current scope.




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: