You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it seems that the only way to continue a statement over multiple lines is to use the backslash character, like Python does. Another programming language that uses significant indentation is Ante, and it has an interesting alternative to backslashes. Instead, you can continue a line across multiple lines by indenting the following lines. So for example, in Erg, this expression:
1..100 \
|>.iter() \
|>.filter i -> i % 2 == 0 \
|>.collect Array
could instead by written as:
1..100
|>.iter()
|>.filter i -> i % 2 == 0
|>.collect Array
Which I think looks much better, and it's also easier to see at a glance where the line continuations are happening, because they're visually grouped.
For what it's worth, Nim also appears to allow you to continue lines this way.
Currently, it seems that the only way to continue a statement over multiple lines is to use the backslash character, like Python does. Another programming language that uses significant indentation is Ante, and it has an interesting alternative to backslashes. Instead, you can continue a line across multiple lines by indenting the following lines. So for example, in Erg, this expression:
could instead by written as:
Which I think looks much better, and it's also easier to see at a glance where the line continuations are happening, because they're visually grouped.
For what it's worth, Nim also appears to allow you to continue lines this way.
The text was updated successfully, but these errors were encountered: