The Raku Programming Language Collect, Conserve and Remaster Project
Originally published on 13 December 2014 by Carl Mäsak.
These comments pertain to this pooost.
lue: ‘“Does this whole thing remind you of beta reduction in lambda calculus?” um, sure :) .’
TimToady: “I think the CoffeeScript approach only works well for pieces of grammar that can have a specific piece of code stand in for a generic node, which is easier for nouns, but harder for more abstract grammatical constructs, like a new trait syntax, or a new parameter syntax. So I’d rather see something tied a little closer to grammatical categories rather than just ad hoc chunks of target text that the substituter might have to guess on which thing, or level of thing, is actually being referred to.”
geekosaur: “seems to me we need (a) some way to introspect the names mentioned in an AST (b) these names should default to be new names not related to any existing ones (i.e. it is an independent scope) unless is used to associate with names presumably via CALLER:: or etc.”
TimToady: “quasi { ¤A ¤B ¤C } # is A a listop? is it a declarator? is B an infix? is C an initializer? the parser must know in advance in order to parse correctly”
TimToady: “the most generic macro in Raku is going to look a lot like a parsing rule with an AST maker for its action closure, which may or may not build the returned AST out of quasis, that may or may not refer to the bits parsed by the parse rule, presumably by the same name they were parsed under”
TimToady: “sometimes I think even %*LANG is the wrong way to handle braids”
masak: “japhb: using parameter typing to decide the grammatical category of incoming ASTs seems, hm, both right and wrong somehow.”
masak: ‘learning from tinkering around with Qtrees: there are things out there that are neither terms, nor expressions, but kind of head off in another direction. yet they are very “structural” and expression-like. they sort of occur in “restricted” parts of the language. that’s also currently where unquotes have trouble going.’
.subst is dependent on implicit variable declarations in a way I hadn’t appreciated when writing the post.”