axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] No-String


From: Vanuxem Gregory
Subject: Re: [Axiom-developer] No-String
Date: Sun, 10 Dec 2006 21:13:00 +0100

Le dimanche 10 décembre 2006 à 19:23 +0100, Ralf Hemmecke a écrit :
> Dear Greg,
> 
>  > )lisp (setq |$String| '(|MyString|))
> 
> Wonderful. Thank you. That seems to do what I want. I don't care much 
> about the SPAD compiler. And in the interpreter I want to see only 
> MyString anyway, because it actually is String only that I have 
> "extend"ed its functionality.
> 
> (1) -> )lib cscombinatversion csaxcompat
> (1) -> )lisp (setq |$String| '(|ACString|))
> (1) ->
> Value = (|ACString|)
> )lisp (setq |$String| '(|MyString|))
> (1) -> l: ACList(ACString) := ["a", "b"]
>     (1)  ["a","b"]
>                                  Type: ACList ACString
> 
> Of course, I have to test that more carefully.

Yes that works only because they are internally Lisp strings
and your implementation use this representation (as String).

> What are the corresponding variables for
> 
> SingleInteger
> Character

Nothing (though |$SingleInteger| exists), they are not what I call
primitive types. To create a Character or a SingleInteger you have, as
far as I know, to coerce a string (with the 'char' function) or an
Integer.

> List

This one is special, List are created at the Lisp level in the
interpreter (as String and Integers), there is no variable that holds
this type. The parser probably detect the brackets and creates a Lisp
list.

> Set

Same thing than SingleInteger and Character I believe. I don't know how
to create a set in the interpreter without the set function.

Sorry, as far as I know what you're doing can be done only with String,
Integer, PositiveInteger and Integer (|$String|, |$Integer| etc...) but
I repeat, don't do that :-), the behavior of Axiom becomes undefined. 

[...]

> Clear, but I like more that way the Aldor compiler handles that. The 
> only knowledge it has is that for something that looks like a float, 
> integer or a string it has to call functions
> 
> float:   Literal -> %
> integer: Literal -> %
> string:  Literal -> %
> 
> from whatever domains are currently in scope.
> 
> So my understanding was that if I expose MyString and unexpose String, 
> everything should be fine. Both have a string function but only the one 
> from MyString is now visible to the interpreter. That would be nice in 
> Axiom.

I don't know how Aldor works, but I prefer, too, the way Aldor handles
this.

Greg





reply via email to

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