We are toying with the idea of having a "mode" in the ParaSail compiler in which indenting is significant, as in Python. This would allow the programmer to omit the "end XYZ" part of a construct, provided that they start the next statement at the appropriate level of indentation. This would also allow the programmer to omit the ";" terminator of a statement or declaration so long as continuation lines are indented and new statements/declarations are not indented relative to the prior statement/declaration.
Because we would like to support both styles, we are considering having the "indentation is significant" flag be a function of the filename extension on the file. If the filename ends ".psi" or ".psl" then indentation is not significant, and ";" and "end XYZ" are needed as usual. If the filename ends ".psn" (for ParaSail, iNdented), then indentation is significant, and ";" and "end XYZ" are optional provided appropriate indenting is performed.
This is just an experiment so far, but any comments would be appreciated. This is almost certainly well into the religious zone of language design, so an extra effort toward courtesy in any comments would be very much appreciated...
Because we would like to support both styles, we are considering having the "indentation is significant" flag be a function of the filename extension on the file. If the filename ends ".psi" or ".psl" then indentation is not significant, and ";" and "end XYZ" are needed as usual. If the filename ends ".psn" (for ParaSail, iNdented), then indentation is significant, and ";" and "end XYZ" are optional provided appropriate indenting is performed.
This is just an experiment so far, but any comments would be appreciated. This is almost certainly well into the religious zone of language design, so an extra effort toward courtesy in any comments would be very much appreciated...