dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #26109
Re: Namespace for CSG primitives
-
To:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
From:
Johan Hake <hake.dev@xxxxxxxxx>
-
Date:
Mon, 05 Nov 2012 21:28:42 +0100
-
Cc:
DOLFIN Mailing List <dolfin@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAA4C66Pn0j=QT1Na=XrJmdj=mqfWTaOH5_+sVDMuf1RL4aY5zA@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
On 11/05/2012 09:47 AM, Garth N. Wells wrote:
> On Sun, Nov 4, 2012 at 6:50 PM, Anders Logg <logg@xxxxxxxxx> wrote:
>> On Sun, Nov 04, 2012 at 05:26:53PM +0000, Garth N. Wells wrote:
>>
>>>> One option could be to rename mesh classes to UnitSquareMesh,
>>>> UnitCubeMesh, and keep deprecated (sub)classes UnitSquare, UnitCube
>>>> indefinitely to keep backwards compatibility.
>>>>
>>>
>>> No point in renaming if the deprecated names are to be kept indefinitely.
>>>
>>>> In summary, I would like to add the new classes to namespace dolfin
>>>> but I'm looking for opinions on how to best handle naming conflicts.
>>>>
>>>
>>> I'm always in favour of a consistent, meaningful interface over a
>>> sub-optimal interface for the purpose of backward compatibility.
>>
>> So what are our options?
>>
>> The actual name clashes are between Rectangle/Rectangle and Box/Box (+
>> maybe some more that I'm overlooking).
>>
>> We could suffix everything:
>>
>> RectangleGeometry
>> RectangleMesh
>>
>> or
>>
>> RectangleShape
>> RectangleMesh
>>
>> to keep it shorter.
>>
>> One could argue that the suffix is only nedded for the meshes, since a
>> Rectangle(Geometry) is really a rectangle, whereas the RectangleMesh
>> is not a rectangle; it's a mesh of a rectangle.
>>
>
> I would prefer the suffix only for the meshes, e.g.,
>
> Rectangle
> RectangleMesh
+
Johan
> Garth
>
>
>> If we suffix all mesh classes with Mesh for consistently, we should
>> keep UnitSquare and UnitCube around with deprecation warnings for some
>> time (a limited time but not indefinite) since they are heavily used
>> in tutorials, demos, the book etc.
>>
>> --
>> Anders
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References