Friday, May 15, 2009

Google Operator Observation

I was writing a small Ruby program and with out thinking wrote:

count++

Which of course produces a : :syntax error !! when executed. Duh, Ruby does not have pre/post increment/decrement operators.

I wanted to find more information about this, so I started with Google, typed in ruby ++ and hit search.


That's cool the suggestion for 'Ruby ++' is 'Ruby increment'. So Google recognises programming operators?, not exactly. I could not get the same suggestions for other operators.

Other words like 'test ++' did not give a 'test increment' suggestion. Other programming languages did produce this like 'perl ++' but others didn't like 'java ++'.

I couldn't find alot of information on the 'See results for' feature. My guess is that a 'programming language name' and '++' and 'increment' must show up together in alot of webpages and Google is not doing some cool operator interpretation, ... sad.

No comments:

Post a Comment