Rather subtle problem with ordergreat+letsimp



--- Richard Fateman  wrote:
 
> One way to approach this is to have all expressions
> that are units expressions have a wrapper like units(.....). 
> Then without changing anything else in display, you 
> can use a data-directed addition to displa  (and nformat)
> to   format and display  unit expressions. 

I'd like to second this suggestion. The main advantage
of this approach is that it is easy to distinguish things
with units, which need special treatment, from everything
else. I think it's fair to say some of the problems that
you have encountered, Cliff, stem from not making this
distinction.

Cliff wrote:

> >As a design principle I still think it is a Bad Idea 
> >to have share packages redefining core functions, but 
> >perhaps I'm being overly paranoid.

Well, you wouldn't want to replace nformat or whatever,
right? Maybe something like (setq foo (symbol-function
'nformat)) and in your private nformat, handle some special 
cases and punt back to the original via (apply foo (...))
for everything else. It's easy to identify the special cases,
because they're just the ones with operator = $units or whatever.

About display, apparently in Mma you can specify that
something other than the name of an operator is displayed.
Someone wrote a Mma units package with an operator named
UnitsWrapper, but hiding the operator to get 100 feet, 100 kg, etc.
(See: http://library.wolfram.com/infocenter/MathSource/4283/)
Maybe the units operator can simply be suppressed in output.

For what it's worth,
Robert Dodier


		
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html