Hi Andrey!

(oups, I see that I misspelled your name recently; sorry!)

On Fri, Mar 18, 2011 at 11:42:27AM -0700, Andrey Novoseltsev wrote:
> We have a heated debate on http://trac.sagemath.org/sage_trac/ticket/10140
> regarding the following issue.
> 
> When a user writes
> 
> Cone(rays=[(1,0), (0,1)])
> 
> and the internal framework that eliminates unnecessary generators
> comes up with a cone generated by (0,1) and (1,0) (i.e. same rays but
> in reversed order), should the order given by the user restored by
> default, or should we have
> 
> sage: C = Cone(rays=[(1,0), (0,1)])
> sage: C.rays()
> [(0,1), (1,0)]
> 
> Obviously, any case is mathematically valid.
> 
> I argue that if a user gives rays in certain order, then (s)he may
> want them in that particular order. (Restoring the order may be a slow
> down, but there can be an optional parameter to turn it off.)
> 
> Volker argues that we should not make cones decorated unless we are
> explicitly asked to. (Those who care about the order, should use some
> other class/function like OrderedCone.)
> 
> More details/issues are available on the ticket, but since many of
> them are a matter of taste and personal preferences, it would be nice
> to hear what do multiple people think of it, not just two of us ;-)

Just two cents from an outsider (I'll certainly will have a need for
Cone's at some point, but don't have practical experience).

When there is no clear cut answer for a design decision, I tend,
whenever possible, to just postpone it; more often than not, the
answer will become clear by itself after accumulating practical
experience. In that case, there could be an option like:

        Cone(rays=[(1,0),(0,1)], keep_order = True)

and the documentation could explicitly specify that the default value
is currently *undefined*, and will be chosen later on. I guess for the
moment I would unofficially set it to False, since that's the cheapest
while True is somehow "adding a feature"; so that's less likely to
break code in case of change later on.

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to