Open davidchase opened 10 years ago
+1 you should not use eval.
From what I can tell, the eval
allows arbitrarily long chains of "dot notation". If we had list comprehensions, or by brute-forcing a for
loop, the same thing could be achieved by split('.')
-ing and then using bracket notation.
Yeah I agree, had meant to remove the eval but completely forgot it was still in there. Will fix it tomorrow. Cheers guys.
Daryl.
Sent from my iPhone
On 4 Feb 2014, at 21:32, Steven Harman notifications@github.com wrote:
From what I can tell, the eval allows arbitrarily long chains of "dot notation". If we had list comprehensions, or by brute-forcing a for loop the same thing could be achieved by split('.')-ing and then using bracket notation.
— Reply to this email directly or view it on GitHub.
Yeah I was just curious because in my implementation I subbed out the eval with bracket notation and all is well :)
I found your autocomplete via ngModules its pretty sweet! & easy to use..
But my question is, what was the reasoning behind using eval when you can just use bracket notation instead and achieve the same results instead of sprinkling eval around?
Thanks -David