Open evincarofautumn opened 7 years ago
One thing I can say in relation to this is that I really dislike //
and /* */
style comments. Would much prefer Haskell's --
style. Haskell uses {- -}
for multiline commrnts, which is okay. (- -)
would be more Forth like. But for this issue a better idea might be to use ---
to simply separate alternating code vs comment.
I’m not sure any particular choice for comment syntax is clearly better than any other, so borrowing C-family syntax seemed reasonable. And I guess the “literate Kitten” approach is cleaner and simpler; ---
would probably work for that too.
It would be nice if, after an interactive mode session, you could copy and paste the entire session from your terminal into a source file and have it just work without modification. This was one of the reasons why
//
was chosen as the command prefix.To do this, we would need to:
Prefix or surround all compiler output with comment delimiters, or introduce an alternate “literate” notation in which the Kitten prompt is the same as the code prefix.
Only allow the operands of infix operators to span multiple lines if wrapped in parentheses. (This should also help a lot with error messages.)