Google indexing code patterns (Re: lexical for-in/for-of loose end)
Google's code search allows searching for regular expressions. Perhaps that could be useful.
Sent from Android
Google Code Search is no longer available, sadly.
On Jan 31, 2012 3:38 PM, "Sam Tobin-Hochstadt" <samth at ccs.neu.edu> wrote:
Google Code Search is no longer available, sadly.
Oh, I didn't know it was shutdown. Hopefully some Google internals can still use that data to give some stats when those questions arise...
I did a code search for "for (var ident =" before code search was shut down and the only code it found was from test suites.
I think it would be "semantically" correct to allow at least "let" there as it is for loops
for (let i = 0; i < length; i++); // OK
for (let key in obj); // not OK ?
weird, I know destructuration is OK but for/in are still for loops
my 2 cents,
br
Sorry, the search was a lot more elaborate to include "in" too.
Erik Arvidsson wrote:
Just an idea. Google crawls over the whole (crawler-accessible) web. That means it is indexing a lot of .js files out there.
I saw questions like the one above appear more times on this list. How often is [insert-your-own-quirk] used / is it used ever? Code files are of defined structure, unlike people-written documents. If Google would be able to index code files with some added information that allows to search in that structure, it could yield important information about usage patterns of this or that programming language.