<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
The NeverEnding story never ends. Good!<br>
<br>
<div class="moz-cite-prefix">Le 14/09/2015 04:17, Richard A. O'Keefe
a écrit :<br>
</div>
<blockquote
cite="mid:4CF0BE86-1436-4FDB-96DD-4DE7AF846EB4@cs.otago.ac.nz"
type="cite">
<pre wrap="">Without taking a stand, I note that Clean has one class
per "arithmetic" function.
</pre>
</blockquote>
This should not be understood too rigidly, we can combine various
sectors under one name, e.g.,<br>
<br>
class Determinant a | *, -, fromInt a<br>
<br>
-- as exemplified in the Clean book on FP, page 85. This is a
shortcut, but replaces Haskell classes with many members.<br>
<br>
<blockquote
cite="mid:4CF0BE86-1436-4FDB-96DD-4DE7AF846EB4@cs.otago.ac.nz"
type="cite">
<pre wrap="">I also note that Money / Money -> Number (not Money)
and if Money * Money -> something, it certainly isn't Money.
Similarly, DateAndTime ± Duration -> DateAndTime,
and DateAndTime - DateAndTime -> Duration, but
DateAndTime + DateAndTime does not make sense.
(DateAndTime and Duration come from Smalltalk.)
I've chosen these examples because they are not "metaphorical"
overloadings of the operators. They do obey natural axioms.
E.g., now + (now - now) = now, now + (dur*2) = (now+dur)+dur.
(Assuming exact numbers underneath.)
Sounds like multi-parameter typeclasses are going to be vital
for a restructuring of the numeric classes.
</pre>
</blockquote>
<br>
I am afraid that multi-parameter classes will not "save" anything
without some precision concerning types themselves. As I say from
time to time, physicists live with similar questions for centuries,
in the context of physical units.<br>
<br>
Money*Money is strange. But what about time*time? mass*mass? The
gravitational constant G has the dimension m^3 kg^(-1) s^(-2). But
only in SI, and related system.<br>
<br>
You find all possible powers, of dimensional quantities, depending
on your choice of *fundamental* unities. I learnt in school the
MKS/electrostat system, where an electric charge had the dimension
of the square root of force, m^(3/2) kg^(1/2) s^(-1). Later,
studying quantum electrodynamics, I assimilated the "truth", that
electric charge is just a number, dimensionless. Why? <br>
<br>
Because physicists have no reluctance to use UNIVERSAL constants as
pure numbers, which redefines meters, seconds, etc. : the speed of
light is 1. The Planck constant is 1 as well. And the electric
charge becomes dimensionless. <br>
<br>
Cosmologists add G=1, and all dynamical quantities become
dimensionless, no more meters, seconds, kilograms. Just numbers.
They write formulae, where some quantity is proportional to the
logarithm of time. This may disturb even those who accept
non-integral powers of length. Is it "cheating", implying
log(t/t_0), where the denominator reduces the time unit?<br>
<br>
What about fractal objects with abominable dimensions, say
m^(1.2654132089) ?<br>
And such things exist in physics, they are called, for example,
anomalous dimensions, measurable.<br>
<br>
If we decide that there exists universally One Currency to Rule Them
All, say, Renminbi, then <br>
money + money*money + 1/money + exp(-money) becomes computable. <br>
<br>
Of course, you will not measure your waist in Planck length units
(although for myself, year after year, it becomes less crazy), but
all this is not a trivial issue.<br>
<br>
==<br>
<br>
This is another reason (the first was torsors) why I don't believe
in too simplistic playing with straitjackets, forbidding some
operations in the name of "coherence". DateTime vs Duration is
another version of the point/vector discussion, or vector vs. affine
spaces. Thousands of texts covered all that...<br>
<br>
Jerzy Karczmarczuk<br>
<br>
<br>
<br>
<sup></sup>
</body>
</html>