On Thu, Aug 27, 2015 at 6:44 AM, Andy Ferris <[email protected]> wrote:
> I'm writing a macro (for Julia 0.4) that is trying to take over the {}
> syntax and do something special (related to tensor contraction) but I notice
> the code to the macro go's through parse() (or similar) before being parsed
> to my macro function, which means I get deprecation warning for {} as Julia
> 0.3 meaning a constructor to Array{Any} but no longer for later versions.
>
> Is there a way to deactivate the deprecation warning, in general?
>
> Is there a way to deactivate the deprecation warning, just for a specific
> macro? Is there any control macros have over parsing behaviour in general,
> or could receive the raw text (without the end user needing to quote in a
> string)?
>
> As a side note, if Jeff Bezanson's suggestion to use {} as Tuple{} in Julia
> 0.5 is taken up, then I won't even need the macro, which is my motivation
> for attempting to use this syntax now...

I this case, why not just use `Tuple{}`. sth like `@braces_as_tuple
{}` won't be so much easier to write then `Tuple{}` (even if your
macro has a more elegant/shorter name), especially since I don't think
`{}` get's it's own expression type in `0.4`.

Reply via email to