Honu thoughts and clarification

84 views
Skip to first unread message

Christopher Lemmer Webber

unread,
Aug 7, 2019, 2:15:33 PM8/7/19
to Racket Users
Today I read the 2012 Honu paper:

http://www.cs.utah.edu/~rafkind/papers/honu-2012.pdf

Some impressions and a question:

- Well it's pretty obvious where I stand on my preference for lisp
syntax. But! I'll say the Honu paper is beautifully written and is
maybe the nicest non-s-expression approach to macros to date. (Not
as nice or (heh) expressive as if you use s-expressions, but it's
great to have this contribution for when you can't.)

- I was confused a bit by the $ foo ... $ delimiting. Why $ for both
the start and end? I would have thought to do `$( foo ... $)` or
`^ foo ... $` or something. Then it hit me: is this the same reason
we can't do two ellipses at the same level in pattern matching?
That's my guess, would love confirmation/denial.

- The design overall seems to make a lot of sense to me, except for one
big red flag for me: infix prioritization levels. Yikes! Is this a
good idea? So many hours wasted trying to make sense of arbitrary
ordering properties from standard algebraic notations, and now we're
adding the ability for users to add *new* complications? It seems to
me that SRFI 105 had the right idea: a "universal" infix notation
without ambiguity: {x + {y * z}}

My friend Lee Spector is more bold about it than I am:

On the first day of my presidency I will sign an executive order
banning infix notation, thereby preventing the senseless
squandering of so many of our precious mathematical and
computational resources.
-- https://twitter.com/leespector/status/1159155362957877249

Overall though, I want to say that even though I remain cautiously
skeptical about moving to a new surface syntax (but am more satisfied by
what I think the process for exploring it), it's hard to imagine a
better design for a non-s-expression syntax than what Honu has done,
assuming it isn't an "invisible parentheses" approach (like
Sweet-Expressions or Wisp). Good stuff, thanks to those who worked on
it.

- Chris

Matthew Flatt

unread,
Aug 14, 2019, 11:28:31 AM8/14/19
to Christopher Lemmer Webber, Racket Users
At Wed, 07 Aug 2019 14:15:29 -0400, Christopher Lemmer Webber wrote:
> - I was confused a bit by the $ foo ... $ delimiting. Why $ for both
> the start and end? I would have thought to do `$( foo ... $)` or
> `^ foo ... $` or something. Then it hit me: is this the same reason
> we can't do two ellipses at the same level in pattern matching?
> That's my guess, would love confirmation/denial.

As far as I know, Jon simply chose to use `$` that way. I don't
remember any obstacle to the other options, although I have forgotten
some of the details already.

> - The design overall seems to make a lot of sense to me, except for one
> big red flag for me: infix prioritization levels.

I'll blame that one on Jon, too. From a research perspective, it was
good to demonstrate the possibility. :)


Matthew

Reply all
Reply to author
Forward
0 new messages