#10667: Morphisms and Objects of Categories
--------------------------------------------------+-------------------------
   Reporter:  SimonKing                           |          Owner:  nthiery    
                  
       Type:  enhancement                         |         Status:  needs_work 
                  
   Priority:  major                               |      Milestone:  sage-5.0   
                  
  Component:  categories                          |       Keywords:  objects 
morphisms containment
Work_issues:  Cope with non-unique number fields  |       Upstream:  N/A        
                  
   Reviewer:                                      |         Author:  Simon King 
                  
     Merged:                                      |   Dependencies:  #9138, 
#11115, #11780        
--------------------------------------------------+-------------------------

Comment(by nthiery):

 Replying to [comment:53 SimonKing]:
 > Why would one not want uniqueness for temporarily created parents? When
 the same parent is frequently created, then it is more efficient to just
 use a cache. Or are you concerned that one creates too many different
 parents that will stay in cache forever?

 Possibly so. Or about creating many different parents that each need a
 lot of input data, or maybe some non hashable data; and maybe you need
 each such parent only once. So the overhead in time or code complexity
 of guaranteeing unique representation would not be worth it.

 Honestly, I don't have a specific use case, just a bad feeling about
 it.

 > But I think it would be a good idea to add a `X._reduce_from_cache()`
 method to `UniqueRepresentation`: It would remove any item of
 `X.__class__.__classcall__.cache` whose value is (equal to) X,

 +1. I am not sure about the name though. What about something like
 _delete_from_cache instead?

 > and then it would try `X._reduce_from_homset_cache()` as well (which
 > would of course only be available for rings).

 UniqueRepresentation is meant to also be used by non Parents. So I'd
 rather have nothing Parent-related in it. On the other hand, Parent
 could overload UniqueRepresentation's method to also call that for
 homsets.

 Cheers,
                                 Nicolas

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10667#comment:57>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to