Unused variable warning in Julia

179 views
Skip to first unread message

Ben Southwood

unread,
Apr 29, 2016, 8:59:18 AM4/29/16
to julia-users
I really like the functional style of Julia as I primarily code in OCaml.  One of the cool optional features of the OCaml compiler is that if you define a function and a variable is unused, the compiler will complain that you have a variable that was never used.  I'm surprised how many bugs have been caught by this functionality, and I have already been bitten twice by this bug in Julia in my 1st week of using it!  

Is there a chance we will get the ability for the compiler to complain about unused variables?

 - Ben

Stefan Karpinski

unread,
Apr 29, 2016, 9:04:54 AM4/29/16
to Julia Users
This would definitely be a helpful feature in a "warning mode" – it would be great to have a pull request for this.

Tom Breloff

unread,
Apr 29, 2016, 9:26:03 AM4/29/16
to julia-users
Sounds like something that belongs in Lint.jl or similar.  I, personally, have always hated those unused variable warnings, and I can't think of a single bug that I uncovered because of them.
Reply all
Reply to author
Forward
0 new messages