One warning I would give is about leaving a space between the macro name
and the parenthesis with the arguments. This generally does not work in
Julia because Julia has two different macro invocation forms and it mixes
between them.
For example a macro that returns a expression adding its two arguments:
macro adder(ex1, ex2)
:($ex1 + $ex2)
end
There are two ways to call this macro:
@adder(1, 2) # => 1 + 2 => 3
or
@adder 1 2 # => 1 + 2 => 3
but this wont work
@adder (1, 2)
because Julia parses it as the second form of macro invocation and treats
the tuple as a single argument.
On Friday, August 15, 2014 8:25:41 PM UTC+3, Neal Becker wrote:
>
> As another learning exercise, I converted my python 1-d linear
> interpolator
> module to julia. Any suggestions/comments on improvements?
>
> https://gist.github.com/anonymous/19526d1455ba7dc9f48f
>
>