News for hackers. Stuff that matters.
Re:Why Clojure? (2018) by didibus on Monday January 04, 2021 @04:52PM (#25638718)
Oh ya, Emacs default movements aren't great for more line oriented syntaxes, even for s-expressions I have customized things a lot more to my liking and smartparens isn't part of default Emacs either. I don't think Emacs really expect you to stick to defaults, the whole editor is designed to be customized.

When I edit the non s-expressions languages I mentioned I do it in IntelliJ, sometimes with the vim bindings.

Re:Why Clojure? (2018) by yakubin on Tuesday January 05, 2021 @04:15AM (#25643676)
In my experience, it's not about being line-oriented. It's about being punctuation heavy or not. Lisp, except parens, for the most part doesn't have all that much punctuation (quotes and commas are rare). Now let's take this program in C++:

  #include <iostream>
  
  int main() {
      std::cout << "hello, world!" << std::endl;
  }
If my cursor is after "main", then M-f will move my cursor to after "std". It completely ignored "()" and "{". Another M-f moves my cursor to after "cout". Here it ignored "::". Another M-f moves the cursor to after "hello" ("<<" and the quote-mark ignored), another to after "world", and another to after "std" (quote-mark and "::" ignored) etc. It behaves similarly when hitting C-Backspace, where sometimes half a line disappears suddenly, because it was punctuation-heavy. I think once I stumbled upon code where it deleted several lines. On the other hand, when I have a variable like "big_number", then Emacs will happily jump into the middle of it. Even though it's an indivisible token in the eyes of the language's lexer. Of course there is a well-known hack of adding the "_" character to be recognised as a "word character". But it doesn't solve the issue really. The issue is that forward-word uses just one set of word-characters, instead of several sets of characters/regexes for different syntactic categories, which would enable jumping first to "cout" and then to "<<".