← Back to context

Comment by lolinder

1 day ago

I wonder if we'll see a return of the kind of interface file present in C++, Ocaml, and Ada. These files, well commented, are naturally the context window to use for reference for a module.

Even if languages don't grow them back as a first class feature, some format that is auto generated from the code and doesn't include the function bodies is really what is needed here.

Python (which I mention because it is the preferred language of LLM output) has grown stub files that would work for this:

https://peps.python.org/pep-0484/#stub-files

I guess that this usecase would be an argument to include docstrings in your Python stub files, which I hadn’t considered before.