gwl-devel
[Top][All Lists]
Advanced

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

Re: Comments on process template syntax


From: Ricardo Wurmus
Subject: Re: Comments on process template syntax
Date: Wed, 05 Feb 2020 19:04:36 +0100
User-agent: mu4e 1.2.0; emacs 26.3

zimoun <address@hidden> writes:

> Does it make sense to expand "process: proc arg" as "process : proc arg"?
> Well, disallow the colon ':' in all the name (symbol) and then expand.

This is not easily accomplished because “:” is a valid character in a
symbol.  So I’d have to replace the reader to disallow “:” in symbols.
That’s a very big intervention.

> Because this space is a drawback of Wisp, I mean at least to me.
> Especially coming from Python where the standard is to have "def
> proc(arg):" and not "def proc(arg) :".

I see what you mean.  The “:” on its own is just the Wisp way of saying
“wrap the rest of this line in parentheses”.  In Haskell that’s “$”.  In
both cases it’s separate from any identifiers.

In the Python case the “:” serves no real purpose as far as I can tell.

>>     process list-file-template (filename)
>
> I find this one the clearer.

Unfortunately, this one is not possible due to ambiguity in the process
macro as I explained in an earlier email.  We can avoid this ambiguity
by adding “with” as extra syntax:

  process list-file-template (with filename)

It’s not perfect, but I don’t see another way that would be any clearer.
An (untested) alternative is

  process list-file-template this that anything whatever
    …

or

  process list-file-template with this that anything whatever
    …

i.e. just list the arguments after the process name.  What’s not so nice
about this is the lack of visual separation (you will need editor
support to visually set the arguments apart from the first two tokens),
and the fact that you’ll probably have to use a leading period to
continue the line.

I honestly can’t tell which of the options is better.  It’s like saying
the word “table” 50 times in a row and wondering what these odd sounds
really mean…

--
Ricardo



reply via email to

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