"Bill Page" <[EMAIL PROTECTED]> writes:
| On Wed, Aug 6, 2008 at 10:07 AM, Gabriel Dos Reis wrote:
| >
| > | > What is nonconstructive about
| > | > forall(T: Type)
| > | > identity(T x) == x
| > | > which can be used as
| > | > identity 4.4 -- T deduced to Float
| > | > identity "string" -- T deduced to String
| > | > ?
| > ...
| > Ralf Hemmecke writes:
| > |
| > | But still, I think the forall above is fine. | In fact, it can already
| > | be used today since "forall" can be seen as a parametrized
| > | package that exports a function
| > |
| > | identity: T -> T
| >
|
| As a specific example of such a package lets consider:
|
| MyId(T:Type): with
| identity: T -> T
| == add
| identity(x:T) == x
|
| If 'MyId' is exposed in the interpreter then
|
| identity(2.2)
|
| could be instantiated by function selection as
|
| identity(2.2)$MyId(Float)
(1) So you consider
MyId(T:Type): with
identity: T -> T
== add
identity(x:T) == x
much less `heavy weight' than a simple free function
forall(T: Type)
identity(T x) == x
?
(2) identity(2.2)$MyId(Float) precisely illustrates my point
that I have to supply the same information twice: once through
the type of the argument to identity(), and a second time
through the package to (the artiificial) package to select from.
I rest my case.
-- Gaby
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
open-axiom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel