unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
To: Damien Mattei <damien.mattei@gmail.com>
Cc: Christina O'Donnell <cdo@mutix.org>, guile-devel@gnu.org
Subject: Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch, squashed)
Date: Sat, 20 Jan 2024 20:18:22 +0100	[thread overview]
Message-ID: <87le8j4vly.fsf@web.de> (raw)
In-Reply-To: <CADEOadcaA0T_afO7KAEFocdERX7q0v0pvYkqHg8tAv2zDGApBw@mail.gmail.com>

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


Damien Mattei <damien.mattei@gmail.com> writes:

> i just add a #; support in Scheme+  : https://github.com/damien-mattei/Scheme-PLUS-for-Guile
> Scheme+ is an extension syntax to Scheme. It goes in the opposite direction of Wisp or Rhombus (based on Racket) 

Note that Wisp and Rhombus differ: Wisp is just Scheme that allows
reducing parentheses where they can be inferred from indentation.

In intentionally avoids doing anything complex, so it keeps
compatibility with future improvements of Scheme. If you want to improve
beyond what Wisp offers, the best way is usually to build appropriate
control structures that can also be used in regular Scheme.

> by keeping the same
> number of parenthesis, but they are just differents : ( ), { }, [ ]
> and it allow the use of infix expressions.

Is your implementation of {} compatible with SRFI-105? (curly infix)

Can it be used to provide proper operator precedence? (that’s currently
not offered by SRFI-105 and would be quite an improvement)

> Parenthesis have advantage on indentation (and inconvenient i admit). For example if you comment a single line of indented code (python for
> example) that was used to define a loop you have to reindent all the body code in the loop. If you want to move a block of indented code you
> then have to re-indent it specifically for the new place too.

To some degree yes, though rectangle-editing in Emacs usually makes that
painless.

> Anyway scheme and scheme+ ,C ,C++ code are still indented for readness even if parentheses would be enough to validate the syntax.

One point of wisp is that having a parenthesis as first element on
almost every line makes it harder for people to understand the code as
long as they have not yet trained their eyes to fade parens.

Indentation is what’s easier to humans to understand at a glance, so if
you want to prevent mistakes, you have to indent strictly by the parens.
Wisp follows Python in the reasoning that if the parens *always*
strictly define the indentation, you can just edit the indentation in
the first place without the "detour" over the parens.

An alternate way of getting something similar is parinfer which strictly
couples parens and indentation while editing:
https://shaunlebron.github.io/parinfer/


There are also cases where parentheses are clearer, even for newcomers.
For these, Wisp defers to pure paren-processing inside parentheses (this
also enables simple copy-pasting of regular Scheme code).

Combining rainbow parens (or other ways to fade parens) with parinfer
gives similar reading experience as with wisp, but only for those in
specialized editors, so it doesn’t help newcomers.


On the other hand, a mode like lispy provides expert users with a level
of convenience during editing parethesized code which clearly outclasses
editing Wisp.


So these show clear reasons why Wisp is most used in the niche of newcomers:

- it looks easier without specialized modes, including patches
- it makes it easier to do simple changes (you don’t have to keep
  parentheses balanced)
- it makes it *harder* to build advanced tooling which does in-place
  editing of the AST and simply reflows the code, because switching
  between styles (i.e. adding linebreaks when something is inserted in a
  line) requires more decisions when you use wisp.


I like it that way, because it encourages contributing code to the
regular Scheme codebase, and not building a separate set of Wisp
modules. That reduces the risk of splitting the community.


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

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

  reply	other threads:[~2024-01-20 19:18 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 21:26 [PATCH] add language/wisp to Guile? Dr. Arne Babenhauserheide
2023-02-04 15:08 ` Maxime Devos
2023-02-04 15:46   ` Dr. Arne Babenhauserheide
2023-02-04 19:09     ` Maxime Devos
2023-02-04 21:35       ` Dr. Arne Babenhauserheide
2023-02-05 15:08         ` Maxime Devos
2023-02-14  8:32           ` Dr. Arne Babenhauserheide
2023-02-14 21:24             ` Dr. Arne Babenhauserheide
2023-02-14 23:01               ` Maxime Devos
2023-02-15  1:46                 ` Matt Wette
2023-02-16 21:38                   ` Dr. Arne Babenhauserheide
2023-02-17  1:26                     ` Matt Wette
2023-02-23 11:36                       ` Ludovic Courtès
2023-02-23 17:48                         ` Dr. Arne Babenhauserheide
2023-02-23 18:42                         ` Maxime Devos
2023-02-24 15:45                           ` Ludovic Courtès
2023-02-24 16:34                             ` Dr. Arne Babenhauserheide
2023-03-08 10:34                               ` Dr. Arne Babenhauserheide
2023-05-01  9:54                                 ` [PATCH] add SRFI-119 / language/wisp to Guile? (new patch, squashed) Dr. Arne Babenhauserheide
2023-06-10 16:40                                   ` Ludovic Courtès
2023-06-12 10:22                                     ` Maxime Devos
2023-08-10  6:28                                       ` Dr. Arne Babenhauserheide
2023-08-14 20:11                                         ` Dr. Arne Babenhauserheide
2023-08-14 20:30                                           ` Dr. Arne Babenhauserheide
2023-08-14 22:43                                           ` Dr. Arne Babenhauserheide
2023-08-18 10:29                                           ` Ludovic Courtès
2023-08-18 12:16                                             ` Dr. Arne Babenhauserheide
2023-08-18 17:50                                               ` Dr. Arne Babenhauserheide
2023-09-08 17:46                                               ` Dr. Arne Babenhauserheide
2023-10-05 14:10                                                 ` Dr. Arne Babenhauserheide
2023-10-10 23:04                                                   ` Dr. Arne Babenhauserheide
2023-10-27 22:05                                                     ` Dr. Arne Babenhauserheide
2024-01-09  7:05                                                       ` Dr. Arne Babenhauserheide
2024-01-19  8:21                                                         ` Dr. Arne Babenhauserheide
2024-03-11  1:16                                                           ` [PATCH] add SRFI-119 / language/wisp to Guile? (new patch with more tests, squashed) Dr. Arne Babenhauserheide
2024-01-19 12:10                                                         ` [PATCH] add SRFI-119 / language/wisp to Guile? (new patch, squashed) Christina O'Donnell
2024-01-19 21:37                                                           ` Ricardo Wurmus
2024-01-19 21:47                                                             ` Christina O'Donnell
2024-01-20 11:01                                                               ` Damien Mattei
2024-01-20 19:18                                                                 ` Dr. Arne Babenhauserheide [this message]
2024-01-20 22:59                                                                   ` Damien Mattei
2024-01-20 23:22                                                                     ` Dr. Arne Babenhauserheide
2024-01-21 23:21                                                                       ` Damien Mattei
2024-01-19 23:56                                                           ` Dr. Arne Babenhauserheide
2023-02-24 23:48                             ` [PATCH] add language/wisp to Guile? Maxime Devos
2023-02-24 23:51                               ` Maxime Devos
2023-02-25  0:15                                 ` Matt Wette
2023-02-25 10:42                                   ` Maxime Devos
2023-02-17 23:06                     ` Maxime Devos
2023-02-18  3:50                       ` Philip McGrath
2023-02-18 15:58                         ` Maxime Devos
2023-02-18 19:56                           ` Matt Wette
2023-02-21 12:09                             ` Dr. Arne Babenhauserheide
2023-02-26  7:45                           ` Philip McGrath
2023-02-26 15:42                             ` Maxime Devos
2023-02-26 16:14                               ` Dr. Arne Babenhauserheide
2023-02-26 17:58                               ` Matt Wette
2023-02-26 18:03                                 ` Dr. Arne Babenhauserheide
2023-02-26 18:20                                   ` Matt Wette
2023-02-26 21:39                                     ` Dr. Arne Babenhauserheide
2023-10-02 14:59                             ` Christine Lemmer-Webber
2023-10-02 21:46                               ` guile support for multiple languages [was: [PATCH] add language/wisp to Guile?] Matt Wette
2023-02-23  7:59                         ` [PATCH] add language/wisp to Guile? Maxime Devos
2023-02-23  8:51                           ` Dr. Arne Babenhauserheide
2023-02-23 18:04                             ` Maxime Devos
2023-02-23 18:22                               ` Maxime Devos
2023-02-23 18:36                               ` Maxime Devos
2023-02-23 18:37                               ` Maxime Devos
2023-02-15  8:36                 ` Dr. Arne Babenhauserheide
2023-02-15 20:13                   ` Maxime Devos
2023-02-16  7:01                     ` Dr. Arne Babenhauserheide
2023-02-16  8:03   ` Dr. Arne Babenhauserheide
2023-02-16 11:30     ` Maxime Devos
2023-02-16 21:35       ` Dr. Arne Babenhauserheide
2023-09-30 13:17 ` Christine Lemmer-Webber
2023-09-30 20:09   ` Maxime Devos
2023-10-02 14:48     ` Christine Lemmer-Webber

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=87le8j4vly.fsf@web.de \
    --to=arne_bab@web.de \
    --cc=cdo@mutix.org \
    --cc=damien.mattei@gmail.com \
    --cc=guile-devel@gnu.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).