Hi all. I have been busy and not following the julia development news. are there any news wrt this topic?
What I find dangerous is mistakenly referencing a global variable from a local context, when that is not intended. To me it seems worth adding a qualifier to specify that whatever is not declared as 'global', should only be local (or an error should be thrown). This could also be a julia flag. Do these ideas seem reasonable? Cheers. El sábado, 8 de marzo de 2014 03:40:37 UTC+1, Stefan Karpinski escribió: > > How about check_locals? You can check for both unused and potentially > unassigned locals. > > On Mar 7, 2014, at 5:39 PM, Leah Hanson <[email protected] <javascript:>> > wrote: > > Adding that to TypeCheck sounds pretty reasonable. Functions already > provide their local variable names, so it would be a matter of finding all > variable usages (excluding LHS assignments). I can probably find time in > the next week or so to add it. Maybe "check_for_unused_local_variables"? > (which seems long, but descriptive) > > -- Leah > > > On Fri, Mar 7, 2014 at 4:02 PM, Jiahao Chen <[email protected] <javascript:>> > wrote: > >> On Fri, Mar 7, 2014 at 4:22 PM, Stefan Karpinski <[email protected] >> <javascript:>> wrote: >> > I would prefer to have opt-in (but easy to use) code analysis that can >> tell >> > you that "anwser" is an unused variable (or in slight variations of this >> > code, that "answer" or "anwser" is always or sometimes not assigned). >> >> That sounds like -Wimplicit in fortran compilers, which forces IMPLICIT >> NONE. >> > >
