|
6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today Set by moderator on 28 July 2015. |
|||
|
07:20
FROGGS joined
19:12
FROGGS joined
19:27
vendethiel joined
|
|||
| masak | some stray insights from today's thinking: | 20:30 | |
| the `quasi @ Q::` syntax is going to want to be flexible in two separate ways | 20:31 | ||
| (a) various parsing constructs have delimiters -- Q::Block has {}, Q::ParameterList has (), and Q::StatementList arguably has {} too -- I think we'll want to be lenient and allow most or all of those with or without their delimiters | 20:32 | ||
| (b) I think we'll want to auto-cast both Q::Literal::Str and Val::Str to Q::Identifier when applicable. maybe even to Q::Parameter, but I'm less sure about that one. | 20:34 | ||
| vendethiel | I think we want to *forbid* delimiters | 20:41 | |
| otherwise you can't see what's nested correctly | |||
| when do we autocast to Q::Identifier? | 20:43 | ||
| masak | forbidding delimiters is another attractive option, yes | 20:45 | |
| when do we autocast to Q::Identifier? in a situation like `macro moo(name) { return quasi { my {{{name}}} = 42; } }; moo("x")` | 20:46 | ||
| vendethiel | alright :-) | 20:47 | |
| masak | or maybe you'd have to do `macro moo(name) { return quasi { my {{{name @ Q::Identifier}}} = 42; } }; moo("x")`, I dunno | ||
| vendethiel | mmh, mmh, me half-likey. or something. | ||
| passing it as a string stil feels wrong. | |||
| masak | the more I use this syntax with the @ signs, the more I like it | 20:48 | |
| (orthogonally to whether we end up auto-casting strings to identifiers) | |||
| vendethiel | I'm glad :) | ||
| not sure why "@" rings the "infix! infix! infix!" bell in my mind. probably email addresses? | 20:49 | ||
| masak | it fits very well with what it does | 20:50 | |
| too bad we can't use it in Perl 6... | |||
| next insight: Q::Quasi does not have a $.block, it has $.contents | 21:05 | ||
| 300 tests! \\o/ | 21:54 | ||
| vendethiel | gg! | 22:00 | |