Hacker News new | ask | show | jobs
by m463 526 days ago
I agree with you, but I don't.

The way C handles header files is sort of "seems-to-work" by just blindly including the text inline.

I know this is not a much-used language, but in comparison, Ada did a pretty nice thing. They have the concept of packages and package bodies. The package is equivalent to the header file, and the package body is the implementation of the package.

I remember (long ago when I used ada) that everyone could compile against the package without having the package body implementation ready so the interfaces could all work before the implementation was ready.

an in another direction, I like how python does "header files" with "import". It maps easily to the filesystem without having to deal with files and the C include file semantics.