Search code examples
programming-languages

How would you implement complex if statement without parenthesses


I'm implementing my Java based programming language and I'm struggling with last syntactical problem. I've decided I just don't like those (){}[]. I've just got few crazy ideas, but I'm not sure that I like any of them.

So any idea how to write for example statement for overlapping rectangles without them?


Solution

  • Check out python's if statement. A combination of whitespace and if [CONDITION]:

    The BASIC language variants typically make use of IF [CONDITION] THEN [EXECUTE] ENDIF where the indentation is ignored and optional.