Bill Page wrote:
>
> I've been bugged a little lately by a minor issue of nomenclature.
> Both FriCAS and OpenAxiom have implemented a distinction between some
> "mathematical" or "natural" ordering and equality of the members of a
> domain - which might not always be defined or may be defined in
> different ways, versus the "machine" ordering of the elements which is
> always defined (perhaps even between members of different domains) and
> is constant at least within a given a given session. The machine order
> is not "natural" in the sense that it does not depend on any
> consistent mathematical semantics, but rather could be implemented
> for example by the ordering of the machine memory address of objects.
> Such an ordering might change each time you restart the interpreter or
> if you run the program on different machines. (Does this strategy work
> if memory garbage collection is allowed to move objects in memory?) Or
> with a little more work the "machine" ordering might be defined in a
> "lexical" or syntactic manner in which case the ordering will not
> depend on the details of the representation. In any case the machine
> ordering is important for the efficiency and effectiveness of some
> algorithms.
>
> The problem is that FriCAS and OpenAxiom have choosen different names
> for the machine ordering. In FriCAS it is called "smaller?".
> smaller?(alpha,beta) evaluates to true if the value of alpha comes
> before the value of beta in the machine ordering. OpenAxiom calls the
> same thing "before?". The problem is that the English root word
> "smaller" has the connotation of size rather than order. But even the
> OpenAxiom name seems vague and a little awkward to read.
>
> I would like to propose that both FriCAS and OpenAxiom change and
> adopt a common standard name that makes better sense (at least in
> English :-) How about "sorted"? For example
>
> if sorted?(alpha,beta) then ...
>
> This seems easy to read for me. Or if you want a more specific name maybe
>
> if machineSorted?(alpha,beta) then ...
>
> Ideas? Opinions?
>
Ordering form 'Comparable' if possible (and in "most" cases this
is possible) is better than "machine ordering". In particular
we want order from 'Comparable' to gave reapeatable results.
AFAIK 'smaller?' in FriCAS is _not_ used by runtime system, so
has different role than 'before?' which accoding to Gaby is
used by runtime.
Let me add that I chose 'smaller?' as a reasonable name, but
it was _not_ my intention to have really good name. Simply
speaking, 'Comparable' is just small part of library and
ideally programmers should have only limited need to look
at it. There is limited supply of good names and it seems
wasteful to use good name is such place.
'sorted?' is bad name because it is already used with different
meaning.
Concerning having the same name as OpenAxiom: AFAICS 'smaller?'
and 'before?' are different and have different names. I doubt
we gain much by making name the same.
--
Waldek Hebisch
[email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" 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/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---