Re: [Readable-discuss] wisp literal array syntax for Guile, a good idea?
Readable Lisp/S-expressions with infix, functions, and indentation
Brought to you by:
dwheeler
|
From: Arne B. <arn...@we...> - 2017-11-12 22:50:10
|
Matt Wette <mat...@gm...> writes:
> Do you have a syntax for vector literals? If not, why can't you just write
I don’t, but while
(vector '(a b))
⇒ #((a b))
(define (f)
(vector '(a b)) #f)
(procedure-properties f)
⇒ ((name . f))
But
(define (f)
#((a b)) #f)
(procedure-properties f)
⇒ ((name . f) (a b))
So this is a purely Guile-specific issue: I want Guile to recognize the
vector as function-property. If it recognized (vector ...), I could use
the simple syntax
define : hello who
. "Say hello to WHO"
vector
' tests
test-equal "Hello World!\n"
hello "World"
format #f "Hello ~a!\n"
. who
(this would be my preferred approach, but I did not find any way to get
this working)
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
|