4 ms·
That trace is not as bad as I remember but if you write that in a nice long multi-line series of if-statements (say) it’ll still print out the whole mess and on
by makecheck 9y ago
That trace is not as bad as I remember but if you write that in a nice long multi-line series of if-statements (say) it’ll still print out the whole mess and only tell you one useless line number. If there’s a "proc" it’s a little better but it can only show the bad line number relative to the "proc", requiring you to do some manual work to find the function within the file and then the offending statement line.
Also, I have no problem with the logical "$x" syntax; rather, the fundamental flaw is that the string "x" could be used to change the variable "x" without any clue in the syntax that this may happen (e.g. no "&x" like in C, no "\$x" like in Perl; just "x", or worse "$y" that resolves to "x"). And don’t even get me started on multi-level "upvar". This whole thing is a minefield, especially if people use simple variable names that can’t be searched in a code base. If you’re really unlucky, you accidentally swap the order of parameters and it just so happens that your "$x" value is almost plausible so you never notice the disaster you just created. It’s simply a “write once, modify never” coding style: it saves the programmer 10 seconds and creates the most brittle of code. I would never recommend it to anyone.