[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: 1: %
From: |
Gabriel Dos Reis |
Subject: |
[Axiom-developer] Re: 1: % |
Date: |
22 Feb 2006 17:48:46 +0100 |
Ralf Hemmecke <address@hidden> writes:
| Dear Gaby,
|
| On 02/22/2006 04:00 PM, Gabriel Dos Reis wrote:
| > Ralf Hemmecke <address@hidden> writes:
| > | On 02/22/2006 12:21 AM, Gabriel Dos Reis wrote:
| > | > Ralf Hemmecke <address@hidden> writes:
| > | > | > | The problem is the "1: %" as a constant (not a nullary
| > | > function).
| > | > | > The distinction is largely syntactic, not fundamental.
| > | > | | I was once told that in Aldor the difference between
| > | > | a: %
| > | > | and
| > | > | b: () -> %
| > | > | is that
| > | > | b() will run a program which might side-effect other things or even
| > | > | return something different each time.
| > | > expanding on my preivous answer, have a look at the section 5.2 os
| > | > the
| > | > Aldor user guide on literal forming -- you can define your own function
| > | > to interpret a string literal as a constant.
| > | | I knew about this Literal stuff before...
| > I have no doubt about that :-)
| > |
| > http://lists.gnu.org/archive/html/axiom-developer/2006-02/msg00154.html
| > | | But as you see, if you write a domain that has a function
| > | string: Literal -> %,
| > | it is a function and that means that "1" and "1" need not give
| > | identical values.
| > yes, that is precisely why I said in an earlier message that the
| > distinction is largely syntactic. it is not something fundamental in
| > the context of your discussion about axiom and o stuff.
| > Underneath, everything is a function in Aldor!
|
| Well, it might depend on which level you look at it. If the generated
| C code is concerned, I have no idea about that.
if we were to consider implementation details, then descending to the
foam level would suffice :-)
However, I was really thinking of the abstract model -- no
implementation involved yet.
| But if it were really just syntactic, then the output given below is
| strange.
|
| However, this behaviour is exactly, the difference between a constant
| and a nullary function in Aldor.
The difference is not that between a constant and a nullary function
-- btw, anything defined with "==" is a constant in Aldor :-)
if your nullary function y evaluates to the *same* value for same
argument each time, then it would do just fine. You won't see any
difference. The real difference in your program is that of *binding
time*.
| Aldor computes the value for x at the time the domain is
| instantiated. So it is constant over the lifetime of the domain
| (unless some dirty tricks change that value). For y it is
| different. That is a function constant. But a constant of type ()->%
| not of type %. Now, of course, if you say "y()", you get something of
| type %. But each time you call y() you might get a differen element of
| %.
|
| I guess, you know all this stuff.
yes, thanks. I'm still puzzled as to why you're collapsing binding time
distinction with constant vs. nullary function.
-- gaby
- RE: [Axiom-developer] about Expression Integer, (continued)
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/20
- Re: [Axiom-developer] about Expression Integer, Gabriel Dos Reis, 2006/02/20
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- Re: [Axiom-developer] about Expression Integer, Gabriel Dos Reis, 2006/02/21
- [Axiom-developer] 1: %, Ralf Hemmecke, 2006/02/21
- [Axiom-developer] Re: 1: %, Gabriel Dos Reis, 2006/02/21
- [Axiom-developer] Re: 1: %, Gabriel Dos Reis, 2006/02/21
- [Axiom-developer] Re: 1: %, Ralf Hemmecke, 2006/02/22
- [Axiom-developer] Re: 1: %, Gabriel Dos Reis, 2006/02/23
- [Axiom-developer] Re: 1: %, Ralf Hemmecke, 2006/02/22
- [Axiom-developer] Re: 1: %,
Gabriel Dos Reis <=
- [Axiom-developer] Re: 1: %, Ralf Hemmecke, 2006/02/22
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- Re: [Axiom-developer] about Expression Integer, Gabriel Dos Reis, 2006/02/20
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- Re: [Axiom-developer] about Expression Integer, Gabriel Dos Reis, 2006/02/21
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/20
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/21
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21