Lint.jl icon indicating copy to clipboard operation
Lint.jl copied to clipboard

Linting code quoted in `:( )`

Open tonyhffong opened this issue 11 years ago • 3 comments
trafficstars

Apparently there is this very rare edge case

ex1 = :( a,b = (1,2) )
ex2 = parse( "a,b = (1,2)" ) # different!

tonyhffong avatar Nov 06 '14 15:11 tonyhffong

Another possibly related issue I've been running into:

    ex = :($(+)(1.0,x))
    f = eval(:(x->($ex)))

Returns:

[                    ]    2 INFO   Argument declared but not used: x

compressed avatar Dec 03 '14 12:12 compressed

Unrelated to my original intent but related to a broader reading of this issue. This one should be fixable.

tonyhffong avatar Dec 03 '14 13:12 tonyhffong

Perhaps unrelated, but I think we should emit a warning for parse("blah blah blah"). This style seems like it's a holdover for people coming from languages where code is represented as a string, and not as a first-class data structure. :( blah blah blah ) is better because it gives compile-time syntax checking, is more readable, and is probably also faster when run in loops.

TotalVerb avatar Jan 06 '16 06:01 TotalVerb