> That's true, in theory. In reality though, when is that information extracted? What do you use to extract it? Where is it saved once extracted? How easy is it to review it? Do you need to use an IDE to do that?
This is part of the GNU Ada toolchain.I don't write Ada, but I have looked into it. I strongly dislike having to write an entire separate type/interface file that repeats the type definitions from the implementation.
This information exists -- a tool should be able to extract the signatures and spit out the interface file automatically (IE a header for C/C++)!
In Ada, this tool is called "gnatchop"
https://learn.adacore.com/courses/GNAT_Toolchain_Intro/chapt...
Instead of writing an ".ads" and ".adb" file (like ".h" and ".c"), you just write an ".ada" file and feed it to "gnatchop", it creates the two files for you and you're ready to compile.
gnatchop example.ada # (example.adb + example.ads created)
gprbuild p_main # (builds from example.adb)
Another neat thing Ada can do is interop with C++! It has C interop, but can ALSO support C++.https://gcc.gnu.org/onlinedocs/gnat_ugn/Interfacing-with-C_0...
https://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/i...
It can take C/C++ headers and auto-generate the interop code you need as well
$ g++ -c -fdump-ada-spec -C /usr/include/time.h
$ gcc -c *.ads
https://gcc.gnu.org/onlinedocs/gnat_ugn/Running-the-Binding-...https://gcc.gnu.org/onlinedocs/gnat_ugn/Generating-Bindings-...