dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #26106
Re: Namespace for CSG primitives
-
To:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
From:
Anders Logg <logg@xxxxxxxxx>
-
Date:
Sun, 4 Nov 2012 10:50:38 -0800
-
Cc:
DOLFIN Mailing List <dolfin@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAA4C66P0VdW-HR=sgDUxStUXjPtTPOPzc5Jv8gSAwk7jAyD2ZA@mail.gmail.com>
-
User-agent:
Mutt/1.5.21 (2010-09-15)
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.
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
Follow ups
References