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

What I understand is the preprocessor causes issues where you could do that maybe 99.9% of the time, especially with well written code. But it'd fail that 0.1% of the time.

You do have analyses like ctags. In theory the compiler could use ctags to find definitions in source code. My experience is ctags can get confused. It's possible in a set of files to have multiple implementations of a function and ctags can't tell which one is used. And I see cases where it can't find definitions.

Personally I'd be happy if the compiler tried to find a missing definition using ctags and issued a warning.

I have wondered if adding funct, public, private keywords to the language might allow the compiler to reliably find function and stuct definitions in source files.



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

Search: