2 comments

  • karmakaze 1766 days ago
    Too bad about the trailing commas and semicolons. It would be cleaner if they could be implied and there be punctuation for when a comma or semicolon is not meant.

    The commas aren't visually as bad as the semicolons. Would it work to say in an off-side block any non-blank line implicitly ends with semi-colon unless it explicitly ends with comma or colon?

    • chankyin 1766 days ago
      Also, semicolons in Rust have special semantics. In Rust, semicolons are delimiters rather than terminators, and function similar to how comma operators work in C++ (see https://en.cppreference.com/w/cpp/language/operator_other). While some may not like the implicit return behaviour in Rust, I think it has a genuine idiomatic meaning in Rust that cannot be easily replaced. Ending a function with a semicolon differentiates returning the last value from returning void (i.e. the empty tuple), so it does not seem like a good idea. (This is a proof of concept anyway it's not like I'm introducing a new language)
    • chankyin 1766 days ago
      This project is mostly about the indentation. Semicolons aren't really part of this project.
  • smt88 1766 days ago
    Why do you prefer semantic whitespace?
    • chankyin 1766 days ago
      You can find loads of reasons for and against semantic whitespace out there. I created this project not because I think it's better or worse, but just that it's cool to offer such a variant. As mentioned in the README, I don't really recommend using this in serious projects, not because I am against semantic whitespcaes, but because multiple variants of the same language just sucks. (Yes, just like Python 2 vs Python 3) (I actually hate Python for lots of things, but nothing to do with the semantic whitespaces)