[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] RE: [Aldor-l] RE: Axiom domains and Aldor return types

From: Page, Bill
Subject: [Axiom-developer] RE: [Aldor-l] RE: Axiom domains and Aldor return types
Date: Wed, 12 Jan 2005 15:04:53 -0500

On Wednesday, January 12, 2005 11:03 AM Ralf Hemmecke wrote: 

> ...
> I am, however, very much against the Any type. It is like 
> building a strongly typed language and than trying to forget
> about types.

Well that is more or less what I naively thought as well but
from the ANY.spad file I read that:

)abbrev domain ANY Any
++ Author: Robert S. Sutor
++ Basic Functions: any, domainOf, objectOf, dom, obj,
++   showTypeInOutput
++ Related Constructors: AnyFunctions1
++ Description:
++   \spadtype{Any} implements a type that packages up objects and
++   their types in objects of \spadtype{Any}. Roughly speaking
++   that means that if \spad{s : S} then when converted to
++   \spadtype{Any}, the new object will include both the original
++   object and its type. This is a way of converting arbitrary
++   objects into a single type **without losing any** of the
++   original information. Any object can be converted to one of
++   \spadtype{Any}.

and in the related file ANY1.spad

)abbrev package ANY1 AnyFunctions1
++ Basic Functions:  coerce, retractIfCan, retractable?, retract
++ Description:
++   \spadtype{AnyFunctions1} implements several utility functions
++   for working with \spadtype{Any}. These functions are used to
++   go back and forth between objects of \spadtype{Any} and objects
++   of other types.

So the situation is not quiet so simple. Apparently Any does not
mean Any in the sense of throwing away essential information.

Bill Page.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]