in reply to Re: OT: Converting some js to Perl
in thread OT: Converting some js to Perl

The entire question was one of whether that particular construct -- a library call wrapped in an anonymous function at the call site -- had any subtle side effects that were not obvious to me as a programmer with limited js experience. The upshot is that the js is generated code (GWT) and the anonymous function wrapped call to index() is probably an isFound() or doesContain() method call, that get optimised down by the Chrome js engine.

As for the Perl; the part of the js code -- a fairly obscure algorithm -- I was interested in, was brute force extracted to perl; then refactored to suit my needs, in my favorite and most natural programing language, then that was translated again into yet a third language; so the performance of the Perl code wasn't important; ensuring that I understood the subtleties of the somewhat obfuscated js code was.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit