guile-user
[Top][All Lists]
Advanced

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

Re: [Readable-discuss] wisp literal array syntax for Guile, a good idea?


From: Alan Manuel Gloria
Subject: Re: [Readable-discuss] wisp literal array syntax for Guile, a good idea?
Date: Wed, 13 Dec 2017 06:58:26 +0800

This is arguably NOT a Guile-specific issue, but rather a general issue.
Clojure uses its array syntax for parts of its syntax, for example.

The ## seems OK, but how about just plain # ?

So like (using only (read) and not (eval (read))):

' a b
=> (quote (a b))
'(a b)
=> (quote (a b))
# a b
=> #(a b)
#(a b)
=> #(a b)

Sincerely,
AmkG


On Mon, Nov 13, 2017 at 6:38 AM, Arne Babenhauserheide <address@hidden>
wrote:

>
> Matt Wette <address@hidden> 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
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Readable-discuss mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/readable-discuss
>
>


reply via email to

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