unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Arne Babenhauserheide <arne_bab@web.de>
To: Mark H Weaver <mhw@netris.org>
Cc: Guile Devel <guile-devel@gnu.org>
Subject: more extensible reader directive, was: Wisp as shipped language in Guile?
Date: Fri, 19 May 2017 23:06:10 +0200	[thread overview]
Message-ID: <87zie8v9od.fsf@web.de> (raw)
In-Reply-To: <87a8693gza.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 2474 bytes --]


Arne Babenhauserheide <arne_bab@web.de> writes:

>> For example, I've pondered the idea of making the "reader directive"
>> mechanism (e.g. things like #!curly-infix) easily extensible.  For
>> example, we could perhaps arrange for 'read', when encountering "#!FOO"
>> in the input stream, to look for a module named something like (system
>> reader-directives FOO) which would extend the reader as needed.
>>
>> What do you think?
>
> That sounds useful on its own

After pondering this a bit, I’m worried that this might push people
towards using reader directives as a replacement for
syntax-definitions. One problem with that is that reader directives
aren’t necessarily composable: While srfi-105 and srfi-119 compose well,
the indentation parsing in srfi-119 and srfi-110 is mutually exclusive.


For Racket I have the impression that this has the effect that the
easiest way to experiment is to define a new language. The main reason
why I think that is #lang typed/racket: Instead of creating a
(define-typed ...) syntax, which would have been available in all
languages, they added the (: ...)  special form.
(https://docs.racket-lang.org/ts-guide/quick.html)

When you define something in a module, it can be used in other languages
— including ecmascript and elisp. More exactly: You know that it can be
(at least I think that — I used Guile features from ecmascript: Is there
a limit to that which I did not hit?). With reader adjustments that’s
different.

However in Racket which started as a teaching language, this easier
experimentation likely outweights the cost of fragmentation into
different structures which cannot easily be used together. If you have
lots of students going into lots of different directions, and you don’t
actually want to recombine their work in specific applications, then you
can easily afford the price of limited composability.


But I’m biased in this: To avoid such fragmentation while providing
indentation-based syntax (which cannot be done at all without adjusting
the reader), I tried to keep the reader adaption in Wisp as minimal as
possible — to defer to regular Scheme as quickly as possible. This
should minimize friction from different approaches for tackling
problems, making it easy for people who start with Wisp to understand
any Scheme code (and vice versa).


Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2017-05-19 21:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07 20:56 Wisp as shipped language in Guile? Arne Babenhauserheide
2017-05-08  2:34 ` Christopher Allan Webber
2017-05-13  1:52 ` Mark H Weaver
2017-05-13  7:24   ` Panicz Maciej Godek
2017-05-13  9:44     ` Arne Babenhauserheide
2017-05-16 19:27       ` nice option to have Fox
2017-05-18 23:03   ` Wisp as shipped language in Guile? Arne Babenhauserheide
2017-05-19 14:54     ` Wisp for Racket / Dr.Racket ? Fox
2017-05-19 21:06     ` Arne Babenhauserheide [this message]
2017-08-11  9:04     ` Wisp as shipped language in Guile? Arne Babenhauserheide
2017-08-11 17:28       ` Nala Ginrut
2017-09-17 19:10         ` Arne Babenhauserheide
2017-09-17 20:28           ` Matt Wette
2017-09-17 23:22             ` Arne Babenhauserheide
2017-09-18  0:24               ` Matt Wette
2017-09-18 19:21                 ` Arne Babenhauserheide
2017-09-19 14:10                 ` Christopher Allan Webber
2017-09-19 23:46                   ` Nala Ginrut

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=87zie8v9od.fsf@web.de \
    --to=arne_bab@web.de \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    /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).