Print

Print


aparsloe skrev 2014-06-08 11.53:
> Should l3fp use juxtaposition *at all* to indicate multiplication? I am an
> enthusiast for l3fp. I am using it constantly (in LyX using LyX's instant
> preview to evaluate formulas), but that has simply heightened my unease
> about using juxtaposition to indicate multiplication, particularly as part
> of a kernel package.

Syntactic sugar: may look like yum, but it can hurt you. :-)

> Most people using numbers have their mental reflexes shaped either by
> mathematical usage or calculator or spreadsheet usage. The last two, to my
> knowledge, don't allow juxtaposition. Multiplication must be explicitly
> indicated with an asterisk.

You conspicuously omit programming languages, which I would put as a 
forerunner of spreadsheets (the less about said, the better), and probably 
also of modern calculators that attempt to display formulae. So it probably 
all boils down to "because that's how it was in FORTRAN" (which, if memory 
serves, ignored spaces).

A data point of possible interest is MetaFont, which has some cases of 
juxtaposition as a high priority operation (e.g. 2/3x means two thirds of 
x). Since it's Knuth, it's probably very consistent, but not necessarily 
intuitive.

> Mathematical usage is variable and often irregular

Oh yes. One of the really big mistakes people make when trying to implement 
mathematics is believing that the mathematical formula language is 
consistent, just because it is precise. Juxtaposition can denote pretty much 
*anything* (depending on context), and because juxtaposition is 
multiplication, it follows that pretty much anything can be regarded as a 
kind of multiplication. ;-)

Lars Hellström