Skip to content

Line-orientation and continuation lines and blocks #3

@OJacot-Descombes

Description

@OJacot-Descombes

The language is line-oriented. Continuation lines are introduced with a back-tick ( ` ) and their indentation does not matter. Nested blocks have an indentation increased by 4 spaces.

Advantages: Line-orientation removes the need for semicolons and parentheses in many situations. Indentation sensitiveness allows to eliminate curly braces and block-end symbols. A line continuation character at the beginning of the line has a better visibility compared to a continuation character at a line end.

Line orientation enforces a unique style, unlike in C# where you can have a unique statement in an if-statement on the same line, indented on the next line, enclosed in braces, on the same line, first brace on the same line, braces indented, not indented etc., etc., etc...

Example:

if a < 100 && b < 100 &&
`  c < 100 && d < 100
    WriteLine("They are all less than 100")
else
    WriteLine("Some guy is too big")

Example of alignment. A back-tick indicates a continuation line:

while i < a.Length &&
`     a[i] == null
    i++

I expect that the IDE will provide visual hints like lines or indentation based background coloring:

background_coliring

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions