Waldek Hebisch wrote
> The Axiom book, and in particular first chapters, is intended
> to introduce readers to Axiom. Fine distinctions between
> language and library would probably overwhelm the readers.
The matter is that
it is very difficult to understand from the book just
what are the main constructs and principles of the
Axiom programming language.
Just to understand the issense of the language.
> Spad allows much heavier overloading then is possible in Haskell.
> [..]
Haskell has much of overloading. I do not know of any example of what
needs more overloading. May be, you give such?
> Anyway, FriCAS categories have parameters which may be types or normal
> values -- my impression is that Haskell type classes only allow types
> as parameters.
Yes.
> In FriCAS parameters to categories itself have types.
> Both interface part (exported signatures) and implementation part may be
> conditioned on types of parameters. Parameters to types may be computed
> at runtime and effect of conditionals depends on actual type.
> In absence of conditionals type checking uses static information
> (given by categories), but for example in:
>
> f(a : A) : A ==
> if A has Field then 1/a
> else a
>
> when typechecking '1/a' typechecker knows that A is a Field
> (because we checked this in 'if'), so division is available.
> This type of conditional is used a lot in FriCAS algebra.
>
> BTW: Typically the above is written as:
>
> if A has Field then
> f(a : A) : A == 1/a
> else
> f(a : A) : A == a
>
> In the first form test 'A has Field' is done each time f is
> executed, in the second test is done when domain or package
> containing f is initialized (there is separate instance for each A).
Yes, this is a real point.
I suspect that this (+ dependent types of Aldor)
is the only principal feature in "(Spad+Aldor) minus Haskell".
It weights a lot. Due to this DoCon has more complex architecture than
it could have.
1) And what about ML or such languages?
2) Is this feature done by the Common Lisp object system (CLOS) ?
(I do not know what is CLOS).
------
Sergei
--
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.