4 ms·
> Agreed, "aligned with opening delimiter" is brain dead, As a smug lisp weenie that has been working in python for many years, I completely disagree with this
by merlincorey 10y ago
> Agreed, "aligned with opening delimiter" is brain dead,
As a smug lisp weenie that has been working in python for many years, I completely disagree with this.
> you just waste time re-justify everything if you refactor.
A single `indent-region` in emacs and you are rejustified, no trouble.
> It's just more effort in the long run, and for what?
It's more effort as opposed to what, exactly?
> It isn't prettier, more readable, or more convenient.
It is, to me, prettier, but I think, objectively, it is more readable than alternatives, especially if there is any kind of nesting involved.
I concede that if there is nesting involved, you might be bumping into other python style issues, and generally might want to add some intermediate variables, etc; however, I do believe that in at least some cases this is entirely inconvenient, and so the lisp way of aligning parameters with their delimiter is the way to go in those cases. Anything else would be quite a bit less readable.
- antris 10y ago> A single `indent-region` in emacs and you are rejustified, no trouble. Yeah, I'll just change my text editor because someone in the team wants to use this rule. So convenient.
- guitarbill 10y ago> > you just waste time re-justify everything if you refactor. > A single `indent-region` in emacs and you are rejustified, no trouble. Because when you refactor the function/class name, it's never just one region. So now you have to go back and indent all occurrences, maybe even over multiple files. Brilliant!
- dkbrk 10y ago> Because when you refactor the function/class name, it's never just one region ... the region is whatever you say it is: (mark-whole-buffer) (indent-region) Or, most likely, something like: C-x h TAB I don't think that's particularly onerous. It's only a few lines of elisp to visit all the files in a tree and automatically format them. That said, it would probably be more sensible to modify whatever refactoring tool to be indentation aware, if it isn't already. Again, that's easy to do with elisp.