Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move .txx to .hxx file extensions. #20

Closed
hjmjohnson opened this issue Feb 27, 2016 · 1 comment
Closed

Move .txx to .hxx file extensions. #20

hjmjohnson opened this issue Feb 27, 2016 · 1 comment

Comments

@hjmjohnson
Copy link
Contributor

STYLE: Change for development tool compliance

PREMISE:
The use of the .txx file extension for indicating the file
that is to hold the implementation of a template class is
only adopted by the ITK community and VNL communities (and has
slightly “infected” a few other small components of other projects).
Increasingly tools are being created to help the programmer better
understand and analyze, and provide hints to proper coding options
dynamically in the development environment (color coding, auto-completion).

The obscure .txx file requires special configuration of each development
environment tool to indicate that it is really a c++ header. For new
developers this is often a difficult and frustrating task. This is
confirmed by the large amount of documentation for just a few of the
common editors. Tools that recognize and respect the .hxx extension:
uncrustify, vim, emacs, VisualStudios, clang, SlickEdit,
kwrite, etc....) None of these tools recognize the .txx extension without
end user customizations.

CONS:
Many files will be changed, and it will not be backwards compatible for
those who accidently included the “.txx” files in their projects. The .txx
files should not be included in external packages.

BENEFITS:
Implementation files are properly mapped to C++ language type by default
for improved development environment experience.

CONSIDERATIONS:
There is no obvious single correct solution, but in general a common theme
from other guides is that the final extension should be “.hxx” or
some suffix that ends with “.h”. The extension should be all lower case
letters (to avoid problems on case insensitive file sysetms).

PROPOSAL:
In ITKv4 (and outside of the ThirdParty directory) change all implementation files
that currently have a “.txx” extension to have a “.hxx” extension.

An in-depth discussion was held near April 20, 2011 on the Insight-Developers
mailing list.

@SimonRit
Copy link
Collaborator

Thanks for the detailed issue. I am not so fond of such large changes but my collaborators agreed with you so I just applied the change. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants