[julia-users] Re: Macro to generate function signature

2015-05-01 Thread David Gold
Sounds good! I'd be happy to contribute this project and see if folks find it useful. Maybe if things take off we could rename the package so the tagline could be something like "Practice safe binding by 'using Protection'" =p (just kidding!). -D On Friday, May 1, 2015 at 3:30:05 PM UTC-4, Tom

[julia-users] Re: Macro to generate function signature

2015-05-01 Thread Tom Breloff
David and others: I created a new repo (https://github.com/tbreloff/ModuleSafety.jl) where I'm going to play around with some helper functions/macros to help with to safely use "using" and module-local methods. If anyone wants to brainstorm on useful functionality or contribute, please feel fr

[julia-users] Re: Macro to generate function signature

2015-05-01 Thread David Gold
Thank you both, Isaiah and Peter! I'm fairly new to programming and Julia, and you've both helped along my understanding of Expr objects and macros a great deal. I thought I'd share my results: _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)

[julia-users] Re: Macro to generate function signature

2015-04-30 Thread Peter Brady
Looks like I deleted my post. If you can include the function name in the macro argument list this should work julia> macro repper(fname, args...) ex = Expr(:call, fname) for (i, arg) in enumerate(args) push!(ex.args, Expr(:(::), symbol("x$i"), arg))

[julia-users] Re: Macro to generate function signature

2015-04-30 Thread Peter Brady
If you can include the function name in the macro argument list this should work julia> macro repper(fname, args...) ex = Expr(:call, fname) for (i, arg) in enumerate(args) push!(ex.args, Expr(:(::), symbol("x$i"), arg)) end ex end ju