Syntax Comparison

From mi-linux
Revision as of 20:04, 23 January 2011 by In0316 (talk | contribs)
Jump to navigationJump to search

Basics

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment
Multi-line comment
/* comment */
/* comment */
/* comment */
Doesn't have multi-line comments.
Null object
NULL
null
TODO
None
+,-,*,/,%,*
+,-,*,/,%,*
+,-,*,/,%,*
+,-,*,/,%,*
+,-,*,/,%,*
True and false
TRUE, FALSE
true, false
TODO
True, False
Boolean operators
&&, ||, !
&&, ||, !
TODO
and, or, not
Relational operators
<, >, <=, >=, ==, !=
<, >, <=, >=, ==, !=
<, >, <=, >=, ==, !=
<, >, <=, >=, ==, !=


Selection

PHP Java Scala Python
TODO
TODO
TODO
TODO
TODO

Iteration

PHP Java Scala Python
TODO
TODO
TODO
TODO
TODO

Compound types (arrays, lists, etc)

PHP Java Scala Python
TODO
TODO
TODO
TODO
TODO

Input / output

PHP Java Scala Python
TODO
TODO
TODO
TODO
TODO

Exception handling

PHP Java Scala Python
TODO
TODO
TODO
TODO
TODO

Dealing with types

PHP Java Scala Python
TODO
TODO
TODO
TODO
TODO

Classes, objects, methods, etc

PHP Java Scala Python
TODO
TODO
TODO
TODO
TODO