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 16 July 2015.
01:04 vendethiel joined 01:48 ilbot3 joined
moderator 6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today
05:29 ilbot3 joined
moderator 6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today
09:22 vendethiel joined
masak here's an idea. 12:28
I'd like kind of a MOP, but for the mainline lexical scope (and maybe other features of the mainline, too). 12:29
something like `$mainline.declare-var('$x', Int);`
some of those things are purely declarative, and it doesn't make so much sense to go through a Qtree to generate that declarative effect. 12:30
vendethiel "declare-var" would be on block? 12:31
masak I suspect it wouldn't be so direct. 12:32
because Block is available in userland, and you can't do that during runtime.
so it'd be more on a kind of "meta-object" representing the block.
kind of like .^add_method on ClassHOW 12:33
vendethiel mmmmh 12:38
more action-at-a-distance? somewhat
masak this is what macros do. they have an effect on the place where they're injected. 12:41
if you don't want that, consider using a function.
vendethiel on the place they're injected, yes 12:45
but with that, you can pretty much throw any code anywhere
masak that's not what I'm after 12:49
I'm after getting the object for the place where the macro is injected 12:50
$mainline here refers to the point of macro invocation
vendethiel ah! 12:51
COMPILING::^declare-var :P
masak yes, I was close to writing it that way. 12:53
vendethiel totally unrelated, but "back then" was really something else: twitter.com/rpy/status/615044896123031552 12:59
also, I think I like.
you need to attach a var "somewhere"
masak \\o/ 13:02
yeah, I saw that tweet a while back. I might even have seen that message in real life... 13:03
vendethiel I like it* 13:04
masak I think it's a winner. for a certain number of use cases, this is what people want. 13:06
can also install subs that way.
vendethiel I'll agree :) 13:10
22:19 vendethiel joined 23:52 vendethiel joined