unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: Arne Babenhauserheide <arne_bab@web.de>
Cc: guile-user@gnu.org,
	readable-discuss <readable-discuss@lists.sourceforge.net>
Subject: Re: wisp literal array syntax for Guile, a good idea?
Date: Sun, 12 Nov 2017 13:20:27 -0800	[thread overview]
Message-ID: <098670CE-873B-4DCC-A111-A88044861BBD@gmail.com> (raw)
In-Reply-To: <87mv3rgrwk.fsf@web.de>


> On Nov 12, 2017, at 10:34 AM, Arne Babenhauserheide <arne_bab@web.de> wrote:
> 
> Hi,
> 
> Wisp¹ as general syntax is pretty much done. The releases this year only
> provided bug fixes and additional examples. A procedure definition looks
> like this:
> 
> define : hello who
>    format #f "Hello ~a!\n"
>                   . who
> 
> From experience with building tools with Wisp² I am pretty happy with
> its syntax; it feels like a sweet spot between minimal syntax-overhead
> and producing easily readable code (leaning a bit more towards minimal
> syntax-overhead than readable/sweet).
> 
> But there is one Guile-specific feature where it is lacking: When
> defining a procedure in Guile, you can add properties by creating a
> literal array as line — or as second line if the first line is a literal
> string that then serves as documentation. This can be used to define
> tests.³ Then a full fledged Hello World! looks like this:
> 
> define : hello who
>    . "Say hello to WHO"
>    . #((tests
>           (test-equal "Hello World!\n"
>                      (hello "World"))))
>    format #f "Hello ~a!\n"
>                   . who

Do you have a syntax for vector literals?  If not, why can't you just write

define : hello who
  "Say hello to WHO"
  vector : tests
      test-equal "hello World" 
        . hello "World
  format #f "Hello ~a!\n"
            . who






  reply	other threads:[~2017-11-12 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12 18:34 wisp literal array syntax for Guile, a good idea? Arne Babenhauserheide
2017-11-12 21:20 ` Matt Wette [this message]
     [not found]   ` <098670CE-873B-4DCC-A111-A88044861BBD-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-12 22:38     ` Arne Babenhauserheide
     [not found]       ` <87k1yvglih.fsf-S0/GAf8tV78@public.gmane.org>
2017-12-12 22:58         ` Alan Manuel Gloria
     [not found]           ` <CAF+kUQW-m2=OPB1Fjf9_r0ftBj5d_c4NSag-r+HfFtkLEvoomw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-13 17:29             ` Arne Babenhauserheide

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=098670CE-873B-4DCC-A111-A88044861BBD@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=arne_bab@web.de \
    --cc=guile-user@gnu.org \
    --cc=readable-discuss@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).