guile-user
[Top][All Lists]
Advanced

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

Re: Wisp 1.0 released


From: zx spectrumgomas
Subject: Re: Wisp 1.0 released
Date: Sun, 10 Feb 2019 10:55:45 +0100

Thanks. Very interesting!

On Sat, Feb 9, 2019 at 11:50 PM Arne Babenhauserheide <address@hidden>
wrote:

>
> zx spectrumgomas <address@hidden> writes:
>
> > I'm sorry if it's a stupid question, but can the opposite process be
> done?
> > I mean, is there lisp2wisp?
>
> That is no stupid question at all.
>
> The opposite process is possible — the readable project has a sweeten[1]
> script which does just that for readable syntax — but it is hard to get
> right. While going from wisp to Scheme just requires adding parens,
> going from Scheme to wisp sometimes requires human judgement whether to
> keep inline-parens, use an inline colon or use a new line, because the
> inline colon is intentionally restricted to opening parentheses which
> end at the end of the line (to avoid transporting state into the next
> line which the programmer or tooling would have to track).
>
> As far as I know, the sweeten script avoids some of this complexity by
> working on the syntax tree and generating indentation-sensitive code
> from that, but my last information is that by doing so it loses the
> comments.
>
> Since wisp can interact fully well with other code in Scheme files, I’d
> just keep existing code in Scheme, except if you do large-scale
> refactoring on the code anyway.
>
> That said, the sweeten script might get you 95% of the way towards
> turning a file into wisp. Sweet expressions and wisp mostly differ in
> details (wisp intentionally keeps its syntax to a minimum, while sweet
> expressions provide a lot more syntactic sugar for specific cases).
>
> [1]:
> https://sourceforge.net/p/readable/code/ci/develop/tree/src/sweeten.sscm
>
> Best wishes,
> Arne
> --
> Unpolitisch sein
> heißt politisch sein
> ohne es zu merken
>


reply via email to

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