Open tobydriscoll opened 9 years ago
I think we should use a combination of 1 and 3. Since line
is a not-uncommonly used graphics built-in, sticking with zline
make more sense.
On the other hand, given someone is using the toolkit, classes like disk
, polygon
, and ellipse
make sense to have handy. Simpler names are better from a user perspective, and if someone is using this toolkit they either will not have these geometric primitives or if they do will probably have enough knowledge to be able to work around the names without bother.
I think we should leave the cmt
namespace for things used mainly internally by the toolkit itself. Again, for user simplicity, common classes should be as exposed as possible. (At least for a matlab implementation. If we were doing this in another language, e.g. Python, my argument would be completely different.)
I don't know...I'm getting less happy as I go. I'm up to zline, zgrid, zrectangle, and zbox so far. Ugly. I suppose there's option
3a. Prefix everything with 'cmt' or just 'cm'.
Ugh, I see, matlab toolbox function name clashes.
I hesitate to use the 'cm' prefix, but I guess it's no worse than 'z'. Other than 'z' indicates a "complex number" version, or something special, but then why not do all of the basic boundary/region classes like this? Having said that, 'cm' also denotes something special, but then its between cmline
and zline
. How do we feel about the following on the command line:
cmrectangle
cmgrid
cmbox
I could live with these. But then do we also prefix map class names? If not, why would they be special?
But the alternative, putting disk
, polygon
, ellipse
and friends in the cmt
namespace seems worse. Because then why don't we put map names in the same namespace? (I have no good solution here yet, just thinking out loud.)
No resolution yet, but the cmt. namespace is probably just too clunky to contemplate.
Here's a kind of logic. Geometric objects, which could be 2D real or complex, will all get the z prefix. Nothing else needs it. (?)
I can buy into that scheme. The consistency it applies to geometric objects makes sense.
Though are we classing only closed curves as 2d objects or do region objets fall into this category as well? We have disk
as a region, which would then be zdisk
. But we also have circleRegion
. Should it then be zCircleRegion
?
There is some reason for caution when it comes to the classes line, circle, disk, polygon, and ellipse, namely that these are very common and generic names that easily clash with user choices. The options I see are:
My approach in the early version was to use number 3 with the line class only, and leave the others naked.