[Top][All Lists]

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

Re: [Axiom-developer] Re: interpreter and with-expression

From: Waldek Hebisch
Subject: Re: [Axiom-developer] Re: interpreter and with-expression
Date: Wed, 17 Jan 2007 17:50:27 +0100 (CET)

> On Wed, 17 Jan 2007 address@hidden wrote:
> | > The interpreter (in particular pf2Sex) does not handle category
> | > definitions (with-expression). Is that by design or an "unfinished part"
> |
> | I'm not sure that it is possible to create categories at the
> | interpreter level. Well, in theory it is since a category is
> | simply a lisp expression, but in practice I don't think it works.
> | Categories are a compile-time concept.
> I'm unsure about the meaning you give to "compile-time" here.
> Types are compile-time concepts too.  Yet, the interpreter has no
> problem handing
>    Foo == Record(f: Integer, b: Boolean)
> or
>    Bar := Record(f: Integer, b: Boolean)
> Furthermore within an axiom session, it is possible to )compile a file
> and have the result available in the working frame.
> I tripped over this while working on new packages for Axiom, and
> it really is confusing.  I would like to know whether there are
> deep reasons for this, or whether it is because it was not
> finished.

In Axiom getting a "new" instance of an existing type is easy,
you just call the constructor.  But to create a new type you
have to provide the constructor function.  Effectively you have
to "compile" the type.  In principle interpreter could transparently
pass the definition to the compiler, but IMHO differences in
interpreter and compiler language would destroy the illusion.

                              Waldek Hebisch

reply via email to

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