On Wed, Aug 12, 2009 at 7:56 AM, Robert Dodier<robert.dod...@gmail.com> wrote:
>
> William Stein wrote:
>
>> suggested doing almost precisely what Robert Dodier keeps telling us
>> to do, which is make the different units just be symbolic variables,
>
> Well, in addition to implementing units as symbols, it greatly
> simplifies
> the whole business to keep the units separate from the quantities,
> instead of smashing them into the same multiplicative expression.
> Otherwise you have trouble distinguishing units from other terms.

Mathematica "smashes them into the same multiplicative expression" and
honestly to me that is much simpler than keeping the two separate.

> (You're going to allow symbolic quantities, not just numbers, right?)

I don't understand the question.

>
>>           * a very big list of different standard units (e.g., Foot,
>> Mile, Meter Second, etc.), which are all literally just symbolic
>> variables.
>
> I think it's fairly important to keep the names of things close
> to what people would scribble on a piece of paper.
> Unconventional capitalization and having to write out every
> name is going to make it clumsy to use.

I disagree.  I've learned many times over that in math software meant
for a large target audience it is much better to explicitly spell out
functions instead of abbreviating them to what people would write in a
particular area of math.   The user in a particular domain can simply
set their own shortcuts.  E.g.,

  sage: N = units.newton



>
>>  sage: from units import mega, kilo, byte, second, giga, minute
>>  sage: n = 94959 * kilo*byte
>>  sage: n.convert(mega*byte)
>
> I recommend against mega, kilo, etc. Just append Mb, kb, etc
> to your list of conversions w/ Mb = 10^6*b, kb = 10^3*b, etc.
> Otherwise you get megas and kilos floating around in the
> units -- depending on the canonicalization of multiplicative
> expressions you'll get foo*mega where foo is some unit.

Except you won't because you canonicalize to put them in front.  For
the record the above is just what Mathematica happens to do, and it
massively increases them number of units if you have to have mega_byte
(kilo_byte, etc.) in addition to byte.

> FWIW
>
> Robert Dodier
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to