samedi 28 février 2015

What are good tools which can help to get rid of C/C++ header files?

Languages like Java or C# do not require header files and do just fine with placing everything in a single source file. So it is obvious that the concept of header files serves little to no purpose and is merely a historical artefact of C/C++ which causes unnecessary complexity and maintainance overhead.


Obviously it would be easier to write C++ code the same way as in Java, placing all the declarations and definitions in the same file. Tools like lzz allow this coding style by parsing a single file for its definitions, then generating the required .h and .cpp files automatically. Unfortunately this tool doesn't seem to be maintained any more and doesn't support C++11.


Are there any alternative tools and/or coding styles which allow for headerless coding with C/C++?


Aucun commentaire:

Enregistrer un commentaire