[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [Axiom-commit] SF.net SVN: axiom: [345] branches/w
From: |
Gabriel Dos Reis |
Subject: |
[Axiom-developer] Re: [Axiom-commit] SF.net SVN: axiom: [345] branches/wh-sandbox |
Date: |
01 Dec 2006 01:09:31 +0100 |
address@hidden writes:
[...]
| getBrowseDatabase(kind) ==
| $includeUnexposed? : local := true
| - not MEMBER(kind,'("o" "k" "c" "d" "p")) => nil
| - grepConstruct('"*",INTERN kind)
| + k1 := INTERN kind
| + not member(k1,["o", "k", "c", "d", "p"]) => nil
| + grepConstruct('"*", k1)
I don't understand the fine point of this modification:
The original code is tranlated as
; getBrowseDatabase(kind) ==
; $includeUnexposed? : local := true
; not MEMBER(kind,'("o" "k" "c" "d" "p")) => nil
; grepConstruct('"*",INTERN kind)
(DEFUN |getBrowseDatabase| (|kind|)
(PROG (|$includeUnexposed?|)
(DECLARE (SPECIAL |$includeUnexposed?|))
(RETURN
(PROGN
(SETQ |$includeUnexposed?| T)
(COND
((NULL (MEMBER |kind| '("o" "k" "c" "d" "p"))) NIL)
('T (|grepConstruct| "*" (INTERN |kind|))))))))
using a list literal of strings.
The new code is translated as
; getBrowseDatabase(kind) ==
; $includeUnexposed? : local := true
; k1 := INTERN kind
; not member(k1,["o", "k", "c", "d", "p"]) => nil
; grepConstruct('"*", k1)
(DEFUN |getBrowseDatabase| (|kind|)
(PROG (|$includeUnexposed?| |k1|)
(DECLARE (SPECIAL |$includeUnexposed?|))
(RETURN
(PROGN
(SETQ |$includeUnexposed?| T)
(SETQ |k1| (INTERN |kind|))
(COND
((NULL (MEMBER |k1| (LIST '|o| '|k| '|c| '|d| '|p|))) NIL)
('T (|grepConstruct| "*" |k1|)))))))
using more indirections and a list of symbols with different meaning.
Could you expand on what the root problems was?
-- Gaby
- [Axiom-developer] Re: [Axiom-commit] SF.net SVN: axiom: [345] branches/wh-sandbox,
Gabriel Dos Reis <=