[Insight-developers] Proposal to change file naming conventions

Tom Vercauteren tom.vercauteren at m4x.org
Wed Apr 20 17:18:39 EDT 2011


Hey Hans and others,

On Wed, Apr 20, 2011 at 22:53, Johnson, Hans J <hans-johnson at uiowa.edu> wrote:
> So there are 4 proposals out there right now:
>
> 1) Do nothing
> 2) move to .hpp (because some do not like having the -impl.h)

Option 2) or 2b) i.e. .hxx seems a little confusing to me since I have
used several libraries that use these extensions for all-in-one
headers.

> 3) move to -impl.h (a preference for using the file name itself to
> describe intent)

I like Option 3) and could live with Option 3b): -impl.hxx or 3c)
-impl.hpp or anything similar

> 4) move all the source code to the .h files and remove the .txx files

Option 4) does not seem practical to me because we may want to
actually use explicit instantiation in the future. I don't know what
the exact status of explicit instantiation in ITK is right now but I
sort of remember that it wasn't fully supported yet, right?


Just my own feeling,
Tom


> There are pro's/con's to each of these.  Personally, I am compfortable
> with 2-4 we end up doing because they each solve the fundamental
> development environment problem.  I'm slightly opposed to #4 because I
> think that the main header file should ONLY contain necessary
> documentation for describing the API of a class, and that the
> implementation details should be somewhere else.
>
> I'd also like to point out that it has been made quite clear that a
> primary aim of the ITKv4 effort is to make adoption and use of ITK easier
> for new users.  This is our only opportunity for the next 10 years to make
> a change like this.  From the user community that depends on the stable
> releases of ITK, this change should not affect them (and should be
> transparent to all application developers).
>
> Please make your opinions known.
>
> Hans
> --
> Hans J. Johnson, Ph.D.
> hans-johnson at uiowa.edu
> Assistant Professor of Psychiatry
> University of Iowa Carver College of Medicine
> W278 GH, 200 Hawkins Drive
>
> Iowa City, Iowa 52242
> Phone:  319-353-8587
>
>
>
>
>
>
>
> -----Original Message-----
> From: Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
> Date: Wed, 20 Apr 2011 22:42:03 +0200
> To: Hans Johnson <hans-johnson at uiowa.edu>
> Cc: Bill Lorensen <bill.lorensen at gmail.com>, Vercauteren Vercauteren
> <tom.vercauteren at m4x.org>, ITK <insight-developers at itk.org>
> Subject: Re: [Insight-developers] Proposal to change file naming
> conventions
>
>
> Le 20 avr. 11 à 22:35, Johnson, Hans J a écrit :
>
>> I would contend that ".txx" is so not anything but ITK.  It is not
>> natively understood as c++ code in Visual Studio, gcc, clang,
>> kwrite, vim,
>> emacs, or any other development environment.
>>
>> I've been playing with the clang_complete extension to vim, and the
>> txx
>> extension required that I modify clang code to recognize this file
>> type.
>> When teaching, I need to show 1/2 the students how to change kwrite to
>> recognize txx
>> When teaching, I need to show 1/4 the students how to change kwrite to
>> recognize txx
>> When teaching, I need to show 1/4 the students how to change emacs to
>> recognize txx
>>
>>
>> On every new machine, I need to teach vim that txx is supposed to be
>> c++
>> I don't even bother with XCode or Visual studio.  The pain is too
>> high for
>> the return on investment ( I only use them for validation testing).
>>
>> There are several wiki pages, and numerous mailing list queries to the
>> difficulties it causes the user community.
>>
>> For us seasoned ITK developers this minor annoyance is not too bad,
>> but I
>> can tell you that it is a major source of frustration to the user
>> community that is new to image processing.
>>
>
> I understand that, even if I don't personally feel a strong need to
> change.
>
> I'm just asking to not use -impl.h which is
>
> * not different enough of the .h files
> * not in the itk style
>
> Gaëtan
>
>
>
>>
>> Hans
>> --
>> Hans J. Johnson, Ph.D.
>> hans-johnson at uiowa.edu
>> Assistant Professor of Psychiatry
>> University of Iowa Carver College of Medicine
>> W278 GH, 200 Hawkins Drive
>>
>> Iowa City, Iowa 52242
>> Phone:  319-353-8587
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
>> Date: Wed, 20 Apr 2011 22:04:39 +0200
>> To: Bill Lorensen <bill.lorensen at gmail.com>
>> Cc: Hans Johnson <hans-johnson at uiowa.edu>, Vercauteren
>> <tom.vercauteren at m4x.org>, ITK <insight-developers at itk.org>,
>> <Tom at public.kitware.com>
>> Subject: Re: [Insight-developers] Proposal to change file naming
>> conventions
>>
>>
>> "-impl.h" is so not ITK. It means we'll have
>>
>>   itkMedianImageFilter-impl.h
>>
>> Also choosing something which ends with .h doesn't seem like a good
>> idea to differentiate the standard .h files.
>>
>> If there is a strong opinion to move from the .txx extension, I hope
>> we'll find something better than that.
>>
>> And as Brad said this is again a big file move...
>>
>> Gaëtan
>>
>>
>>
>> Le 20 avr. 11 à 20:13, Bill Lorensen a écrit :
>>
>>> I prefer -impl.h over -inl.h
>>>
>>> On Wed, Apr 20, 2011 at 10:52 AM, Johnson, Hans J
>>> <hans-johnson at uiowa.edu> wrote:
>>>> Brad,
>>>>
>>>> I respectfully disagree with your claim that we are getting along
>>>> just
>>>> fine.  In the class that I teach ITK in, students routinely have
>>>> trouble
>>>> with the fact that .txx files are not recognized as C++ files in
>>>> their
>>>> editors of choice.  Even after many months of requesting that they
>>>> put the
>>>> implementations in .txx files they are routinely #include
>>>> "myITKfilter.cxx" in their "myITKfilter.h" file because by naming
>>>> the file
>>>> with .cxx they get highlighting.  Another bad behavior that they
>>>> often
>>>> will make copies of the .txx files with .cxx file extensions.
>>>>
>>>> This has been a continuous source of frustration for new users.
>>>>
>>>> Hans
>>>>
>>>>
>>>> On 4/20/11 8:43 AM, "Brad King" <brad.king at kitware.com> wrote:
>>>>
>>>>> On 04/20/2011 08:47 AM, Cory Quammen wrote:
>>>>>>> 1)  Personally I like the google c++ style approach a lot (ie. -
>>>>>>> inl.h)
>>>>>>> because it more clearly describes the intent of what should be
>>>>>>> in the
>>>>>>> file
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>(http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#The_-
>>>>>>>i
>>>>>>> nl
>>>>>>> .h_
>>>>>>> Files).  I proposed the ".hpp" option mainly as a starting point
>>>>>>> for
>>>>>>> discussion purposes.
>>>>>>
>>>>>> My two cents: I think the "-impl.h" suffix offers the clearest
>>>>>> description of what the file contains.
>>>>>
>>>>> We've been using .txx for 11 years and gotten along okay so far.
>>>>> Changing
>>>>> it now will be yet another massive rename commit combined with
>>>>> lots of
>>>>> updates to other files to fix the inclusions.  It is a huge effort
>>>>> for an
>>>>> "it would be nice" justification.  There is plenty of other work
>>>>> to do on
>>>>> this project.
>>>>>
>>>>> IMO it would make more sense to contribute patches to the editors
>>>>> in
>>>>> question to support .txx by default.
>>>>>
>>>>> -Brad
>>>>
>>>>
>>>>
>>>> ________________________________
>>>> Notice: This UI Health Care e-mail (including attachments) is
>>>> covered by the Electronic Communications Privacy Act, 18 U.S.C.
>>>> 2510-2521, is confidential and may be legally privileged.  If you
>>>> are not the intended recipient, you are hereby notified that any
>>>> retention, dissemination, distribution, or copying of this
>>>> communication is strictly prohibited.  Please reply to the sender
>>>> that you have received the message in error, then delete it.  Thank
>>>> you.
>>>> ________________________________
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>> --
>> Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>> http://voxel.jouy.inra.fr  http://www.itk.org
>> http://www.mandriva.org  http://www.bepo.fr
>>
>>
>>
>>
>> ________________________________
>> Notice: This UI Health Care e-mail (including attachments) is
>> covered by the Electronic Communications Privacy Act, 18 U.S.C.
>> 2510-2521, is confidential and may be legally privileged.  If you
>> are not the intended recipient, you are hereby notified that any
>> retention, dissemination, distribution, or copying of this
>> communication is strictly prohibited.  Please reply to the sender
>> that you have received the message in error, then delete it.  Thank
>> you.
>> ________________________________
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr  http://www.itk.org
> http://www.mandriva.org  http://www.bepo.fr
>
>
>
>
> ________________________________
> Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
> ________________________________
>


More information about the Insight-developers mailing list