Hi Grayson,

I'm really looking forward to your GSoC on curves!

> Currently, the plane curve classes do not inherit from the space curve 
> ...
> It seems that it would be a lot clearer to have a different naming
> scheme, such as having ProjectiveCurve_generic be called
> ProjectiveCurve_plane, and having ProjectiveSpaceCurve_generic be
> called ProjectiveCurve_generic (similarly for the affine curve
> classes).

I think that makes sense: if you restructure the class hierarchy to
modernise and accommodate more powerful code sharing, it makes sense to
rename. I would say that you shouldn't feel too many constraints wrt.
restructuring/renaming these specific structures if it makes sense in
the long run. I haven't been involved in sage.schemes, however, so
someone more invested in that folder might disagree. I believe that the
curves structure hasn't been refactored much from the very first years
of Sage.

I'm a bit surprised at the naming scheme "_generic", etc. in the first
place. We don't use that very often, and it's not very Pythonic. Would a
completely different and simpler naming scheme be appropriate? E.g.:

ProjectiveCurve      - the generic class
ProjectivePlaneCurve - the plane curves

as well as AffineCurve, AffinePlaneCurve (or simply Curve and
PlaneCurve? I.e. you get affine if you don't ask for projective?).

Are you envisioning other specialisations than plane?

Also, you should think about which constructors you want to import in the
top-level, and which constructors should be accessible from a catalogue,
e.g. curves.<tab>.

Technically, the renaming can get a bit tricky with deprecation
warnings, especially if you're reusing a name for another thing.

> Also, since there eventually will be more functionality implemented
> for generic curves and not just plane curves, would it be possible to
> rename the plane_curves folder to something more general such as
> "curves" or "curves_generic"?

I vote for "curves". Everything without a specialising denotation is
generic by default ;-)

I don't know how this works wrt. deprecation. If you rename a folder
which contains functions that were meant to be "top-level importable",
you need to still make that module name available with a deprecation
warning. That might require dynamically injecting a module into the
sage.schemes?


Best,
Johan


Grayson Jorgenson writes:

> Hi all,
>
> I am working on revising the class structure for generic curves to make it 
> easier to implement functionality for the GSoC 2016 project on algebraic 
> curves. The main curve classes right now are ProjectiveSpaceCurve_generic, 
> ProjectiveCurve_generic, AffineSpaceCurve_generic, and AffineCurve_generic, 
> with ProjectiveCurve_generic and AffineCurve_generic representing plane 
> curves. The implementations of these classes reside in 
> /schemes/plane_curves.
>
> Currently, the plane curve classes do not inherit from the space curve 
> classes and there isn't any functionality specific to the space curve 
> classes. The goal of ticket #20697 <http://trac.sagemath.org/ticket/20697> is 
> to make the plane curve classes inherit the space curve classes so that the 
> space curve classes act as the generic classes for projective/affine 
> curves. However, doing this makes the class names a bit inaccurate, since 
> for example the ProjectiveCurve_generic class really represents plane 
> curves and ProjectiveSpaceCurve_generic is the more general class. It seems 
> that it would be a lot clearer to have a different naming scheme, such as 
> having ProjectiveCurve_generic be called ProjectiveCurve_plane, and having 
> ProjectiveSpaceCurve_generic be called ProjectiveCurve_generic (similarly 
> for the affine curve classes).
>
> Is there a policy for changing class names in Sage? Also, since there 
> eventually will be more functionality implemented for generic curves and 
> not just plane curves, would it be possible to rename the plane_curves 
> folder to something more general such as "curves" or "curves_generic"?
>
> Thank you,
> Grayson


-- 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to