Syntax of Decaf Scheme-In-Java, Part 1 |
|
| JAVA | DECAF JAVA-IN-SCHEME |
| 3 | 3 |
| foo | foo |
| new foo() | (new foo) |
| this.F | (dot this f) |
| F(3) | (call f 3) |
| this.F(3, "x") | (call (dot this f) 3 "x") |
| (String) x + y | (cast string (+ x y)) |
| predicate ? consequent : alternative | (? predicate consequent alternative) |
| x = 3 | (= x 3) |
| Jim Miller |