#10963: More functorial constructions
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:  stumpc5
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.1
      Component:  categories         |   Resolution:
       Keywords:  days54             |    Merged in:
        Authors:  Nicolas M. Thiéry  |    Reviewers:  Simon King, Frédéric
Report Upstream:  N/A                |  Chapoton
         Branch:                     |  Work issues:
  public/ticket/10963                |       Commit:
   Dependencies:  #11224, #8327,     |  8045aa4a4b7ada735b3eb6055382f9b341a39f1e
  #10193, #12895, #14516, #14722,    |     Stopgaps:
  #13589, #14471, #15069, #15094,    |
  #11688, #13394, #15150, #15506     |
-------------------------------------+-------------------------------------

Comment (by nthiery):

 Given the number of questions poping out recently, I decided this
 morning that I might as well write the developer's documentation for
 axioms instead of spreading the information in comments on this track
 ticket. Beware: so much more work for you to review :-)

 I hope it will be convincing about the design decisions and, up to
 some point, the implementation. It will take me some more time (until
 tomorrow evening maybe?), so don't start hacking around in the mean
 time!

 I can answer right now to Nils last comment though. I believe that
 {{{
 C.FiniteDimensional()
 }}}
 is *really* better than
 {{{
 C.with_axiom("FiniteDimensional")
 }}}

 Rationale:

 - This idiom is short, unambiguous and super expressive. Look at the
   non trivial examples in the primer and see how painful those would
   be with the _with_axiom idiom. It is backed up by three years of
   practical usage, and during that period it has appeared, as far as I
   know, totally natural to all those who played with it.

 - It's nice w.r.t. introspection:

   - The axioms of C appear in the tab completion of C. In particular
     you get an easy access to the list of them.

   - introspection on C.FiniteDimensional gives specific documentation
     on what each axiom is about.

 - It's consistent with what we have been using for years for
   functorial constructions (Cartesian products, Graded, ...)

 - Categories have few operations. So the odds of a name clash is low.

 - You can *also* use C._with_axiom(...) if you feel inclined to, for
   example if the name of the axiom you are interested in is stored in
   a variable. I am happy to rename C._with_axiom to C.with_axiom if
   you believe it deserves to be public.

 - This idiom does not depend on the actual implementation behind the
   scene. We could still decide later on to store the links in a
   database or whatever.

 Cheers,
                       Nicolas

--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:367>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to