|
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. |
|||
|
02:23
FROGGS_ joined
03:46
vendethiel joined
07:08
FROGGS_ joined
07:35
cgfbee joined
|
|||
| masak | "finding time and motivation to do what I'd like to do" -- yup, that's difficult. | 07:41 | |
| helps to want it, though. | 07:42 | ||
| pdcawley_: re "can I do <weird non-lexical thing> with `return`?" -- I don't know. I can see the need for it, and for other non-lexical shenanigans, but I don't (yet) in which form we'll allow it. I suspect I'll know more after I've gotten through the LoL book. | 09:26 | ||
| pdcawley_ | masak: Cool. I'm not entirely sure that 'return' semantic fiddling is a specifically quasi related thing though. Macro can presumably shuffle through an AST it gets passed as an argument and replace any returns it sees with something special. $AST.unbound - returns a context free AST from a quasi, so '$ast = quasi { return }; ...; $ast.unbound' makes an AST that looks like I built it by hand. | 09:33 | |
| masak | agree on "not specifically quasi related" -- this is more a case of Perl 6 taking lexical scope seriously all the way to core. | 09:34 | |
| my most recent realization is that we simply can't do the AST-related lexical trickery with invisible blocks in the general case. instead, I'm putting my hope to giving each individual identifier an (optional) context/scope/lexpad that quasi/argument ASTs will want to twiddle. | 09:36 | ||
| (reason blocks don't work is things like traits, which sit in a non-expression context and can't really accept an invisible block around them) | 09:37 | ||
| pdcawley_: also, yes, .unbound would be a way to "detach" the return. | 09:39 | ||
| pdcawley_ | masak: If you assume that a macro writer (me at least) might want to be able to fiddle fiddle with the semantics of pretty much every builtin (including ;) in a block, then you won't be far wrong :) | 09:41 | |
| sergot | hi \\o | 09:51 | |
| masak | pdcawley: aye. | 11:06 | |
| pdcawley: in a way, that's what macros are there for, too: allowing "behind the scenes" access to the underpinnings of the language. | 11:07 | ||
| sergot: \\o | |||
| pdcawley | masak: Which implies the ability to get behind Perl's assumptions about scoping :) | ||
| masak | agreed. and also about a lot of other things, such as control flow. | 12:25 | |
| general learning from the past few days of introducing the `MyType { ... }` object literal syntax: if you attempt to overload brace syntax *and* TTIAR, Random Shit Will Break. | 13:33 | ||
| still not convinced it's a bad idea, though. | |||
| also, slightly interestingly, this is the first occurrence in 007 of a "type term". already before we start in on the type-annotations branch :) | 13:36 | ||
|
18:06
FROGGS joined
19:43
vendethiel joined
20:07
vendethiel- joined
|
|||