[Grace-core] Some comments from Tijs on parsing Grace

Tijs van der Storm storm at cwi.nl
Wed Jul 27 04:01:34 PDT 2016


Cool! But wouldn't this be a post-fix operator? For true circumfix, the
inside must be the receiver, no?

T

On Wed, Jul 27, 2016 at 12:32 PM Michael Homer <michael.homer at ecs.vuw.ac.nz>
wrote:

> On Wed, Jul 27, 2016 at 10:23 PM, James Noble <kjx at ecs.vuw.ac.nz> wrote:
> > On 27/07/2016, at 22:14PM, Tijs van der Storm <storm at cwi.nl> wrote:
> >> Moreover, I can't define my own brackety things, so the analogy with
> operators is only partial.
> >
> > you could once, in Kernan.
> >
> >> Btw, reminds me, I once had a language design where , (comma) was just
> an infix binary operator, and bracketing using [] was unary around-fix
> operator. The comma then would create a shallow line-up like object, the
> bracket converted it to a list/array; same with {} for sets. (You weren't
> allowed to use comma expressions in param lists directly, but with
> parentheses you'd just get the shallow line-up). The only problem is that
> you couldn't write empty lists or set using the bracket notation.
> >
> > Ha!  Andrew will probably tell us Smalltalk does that.
> > Self did something similar with && which was a sort of "flat cons"
> > it lifed two objects into a "collection building" except that two
> collection buildrers flattened themselves out (aka flat cons). I'd say it
> was Monadic
> > except that Tim & Wadler would yell at me.
> >
> > I can't remember if Kernan supported empty lists operators: wouldn't
> surprise me.
> It still permits circumfix definitions of mirrored bracket pairs with
> arbitrary parameter and argument lists, including empty and variadic,
> which is what's used for defining method circumfix[ *x ] { x } in the
> prelude.
> -Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20160727/9a3037c0/attachment.html>


More information about the Grace-core mailing list