#16291: Fixing associativity of FormalCompositeMap
-------------------------------------+-------------------------------------
       Reporter:  sbesnier           |        Owner:  sbesnier
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  categories         |   Resolution:
       Keywords:  associativity      |    Merged in:
  FormalCompositeMap                 |    Reviewers:
        Authors:  Sébastien Besnier  |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  198085bda26743ebcb442f3b70698c3055395cd1
  u/sbesnier/ticket/16291            |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by pbruin):

 Replying to [comment:9 defeo]:
 > > What is the reasoning behind `head()` and `tail()`?
 >
 > That was my suggestion. I find ''first'' and ''second'' misleading, and
 think they should be deprecated. ''head'' and ''tail'' are standard names
 in functional languages, e.g. caml. Of course, this is standard
 terminology for lists, where there is little ambiguity on who's the head
 and who's the tail.
 Actually, the moment when I read `head` and `tail`, I was reminded of
 `car` and `cdr`, so that had the desired effect. 8-)
 > As you point out, it is more confusing if you draw arrows, but ''first''
 and ''last'' is no less confusing than ''first'' and ''second'' in my
 opinion.
 Forget what I said about introducing `last`, I was confused.  (Well, we
 could introduce it anyway, but just as "the last morphism in the
 composition", not with the current meaning of `tail`.)
 > We could keep ''head'' and ''tail'', but reverse them to be consistent
 with arrow diagrams (who says ''head'' should be first in applicative
 order? We are making up the terminology, anyway). Or maybe ''head'' and
 ''shaft'', this is even more figurative!
 I think it sounds nice, but `shaft` might be a bit annoying for people who
 don't think of morphisms as arrows.  And I would expect `head` to be the
 ''last'' morphism in the composition, not the composition of all except
 the first.
 > Or, if we want to stick with the applicative order, what about ''first''
 and ''then''?
 I like this idea, because it is close to the existing terminology and
 because `then` is nicely consistent with the way composed morphisms are
 printed.
 > Whatever we choose, I think we should take names that sound ridiculous
 enough to force the user to read the docstring, rather than say "I know
 what that means".
 I don't know, at the same time they should preferably also be of the kind
 that you remember once you have seen them.  And they shouldn't be so
 ridiculous that they become distracting.

 I'm starting to think that altogether `first` and `then` suggests itself
 as the preferred choice.

--
Ticket URL: <http://trac.sagemath.org/ticket/16291#comment:10>
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/d/optout.

Reply via email to