+ 2
What is the fastest method to recognize a programming language ?
9 odpowiedzi
+ 23
You can use Fastlang algorithm:
* include? - C++
* using? - C#
* require? - Ruby
* import?
a. lots of braces and semicolons? - Java
b. no semicolons, code indented? - Python
* lots of lowerthans and greaterthans? - HTML
* same but actually looks like a code? - PHP
* many document. or window. references? - JS
Works almost always ;)
+ 8
by the documentation
+ 3
another way is to look at the very language specific syntax (eg the' :' instead of { } in python. )
+ 2
@Kuba Siekierzynski
thanks for that post!
Do you have a link to more info by any chance? ( in english). i googled but could not find anything satisfying.
0
any other ? from the function or method maybe ?
- 1
I am often confused between php, java and c ++ languages.. I think too much code in my head😁
- 1
how about conditionals and loop ? are they same in each language ?