Ticket #1238 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

Please make Box2I and Box2D that standard names for 2d boxes

Reported by: rowen Owned by: jbosch
Priority: normal Milestone:
Component: afw Keywords:
Cc: rhl, rowen, bick, fergal Blocked By:
Blocking: Project: LSST
Version Number: 3.3.22
How to repeat:

not applicable


We may want 3d boxes in the future. To enable this I suggest that the standard classes for 2d boxes named Box2I and Box2D (and Box/BoxI/BoxD be unavailable or deprecated). It'd be nice to get this in before afw::image is updated to use afw::geom.

Change History

comment:1 Changed 10 years ago by DefaultCC Plugin

  • Cc rhl, rowen, bick, fergal added

comment:2 Changed 10 years ago by jbosch

I'd propose we changed the class names from BoxI -> Box2I and BoxD -> Box2D, but make typedefs to BoxI and BoxD. I don't see any long term problem with leaving those around, though, even if we add higher dimensional boxes - I think it's somewhat sensible for 2 dimensions to be the natural assumption if the dimensions are not specified.

This is a very small change, so I'll just do it in trunk once other interested parties have an opportunity to comment.

comment:3 Changed 10 years ago by rowen

That's better than nothing, but I'd really rather see users always specify -- having different typedefs for the same classes is confusing: some users will use one, some will user the other, and a casual user will have no idea which is which. The Zen of Python says it beautifully: "There should be one-- and preferably only one --obvious way to do it."

For the same reason I would also like to see the PointD/PointI types go away -- so users have to say Point2D and Point2I.

comment:4 Changed 9 years ago by jbosch

  • Status changed from new to closed
  • Resolution set to fixed
  • reviewstatus changed from notReady to selfReviewed

Typedef and class names have been reversed as discussed above in #1556.

Note: See TracTickets for help on using tickets.