>> I like s.cardinality() since that's what I've used often already all >> over in Sage. >> Do >> >> sage: search_src('cardinality') >> <hundreds of places in sage where this is used!> > >Arglll !!! I had this idea and issued an > >tomahawk-*ge-combinat/sage $ grep def\ cardinality\( **/*.py* | wc > 11 35 533 > >which was a pretty low number. For the record: > tomahawk-*ge-combinat/sage $ grep def\ cardinality\( **/*.py* > rings/integer_mod_ring.py: def cardinality(self): > rings/ring.pyx: def cardinality(self): > schemes/elliptic_curves/ell_finite_field.py: def cardinality(self, > algorithm='heuristic', extension_degree=1): > sets/primes.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > structure/parent.pyx: def cardinality(self): > >Is there a standard policy about aliases like card/cardinality ? > >I'm personally against them because they tends to make the code more >confusing. But I'd like to know if there si a general answer.
Axiom provides a general answer. Axiom is structured into 3 different things, Categories, Domains, and Packages. By analogy to, say, dressmaking Categories are components, like patterns, colors, styles, buttons, etc Domains are concrete things like a particular dress Packages are tools that work on dresses, like sewing machines, irons, etc Thus, to construct a particular domain (dress) you choose categories yellow, floweredPattern, 3Button, EmpireWaist, LauraAshleyStyle When you define a domain you mention the categories it inherits. The names of functions NOT locally defined in the new domain get inherited from the categories. Thus, the categories impose a naming convention that everybody uses. Function names such as "cardinality" get inherited everywhere. The suggestion is that Sage consider an Axiom Category-like organization that normalizes the names through inheritance. Of course, this requires a huge re-think of the organization of Sage. It would also require "cover" functions for external packages to map the names to the category names. Tim Daly --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---