Re: [julia-users] Tripping myself up on macro hygiene (again...)

2015-09-22 Thread Tomas Lycken
That's quite a lot cleaner than what I came up with, and keeps as much of the expression as possible in regular code-syntax. Thanks! // T On Tuesday, September 22, 2015 at 11:23:33 AM UTC+2, Tim Holy wrote: > > What you're trying isn't easy because the results of @ntuple, unless > contained >

Re: [julia-users] Tripping myself up on macro hygiene (again...)

2015-09-22 Thread Tim Holy
What you're trying isn't easy because the results of @ntuple, unless contained inside an Expr, will be eval'ed so you'll still create the tuple. And expression-tuples are not iterable, so you can't splat them. Manual construction: function foo(N) args = [symbol("xs_",k) for k = 1:N] :(g

[julia-users] Tripping myself up on macro hygiene (again...)

2015-09-22 Thread Tomas Lycken
I’m having real difficulties grok-ing macro hygiene. I’ve read the manual entry, but didn’t get much wiser, so I’m hoping the solution to my current problem will be another data point I can use to understand (and I need this to work :P). I have a utility function that builds an expression (wh