Comparison of programming languages
From raju
The idea here is to make it easy to do one task across different programming languages. For example, how does the function definition syntax differ across different programming languages? It only lists languages/features I am familiar with. A more comprehensive list can be found at https://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28syntax%29 .
Statement separator
Language | separator |
---|---|
C++, C, Perl | ; |
Python | Not needed if there is only statement on a line. Multiple statements on the same line can be separates by ';' |
Boolean negation
Language | syntax |
---|---|
C,C++ | !a |
Python | not a |
power
Language | syntax | example |
---|---|---|
Python | a**b | 0.6**2 |