Joining the Church of Emacs
fuzzypixelz.com
Joining the Church of Emacs
1–10 of 67 posts
Re: Joining the Church of Emacs
#2Re: Joining the Church of Emacs
#3 one = 1
fortyTwo = 42
elite = 1337
is exactly how most modern linters want to format my code.Re: Joining the Church of Emacs
#4Re: Joining the Church of Emacs
#5I found it amusing his example of badly formatted code one = 1 fortyTwo = 42 elite = 1337 is exactly how most modern linters want to format my code.
For example,
one = 1
fortyTwo = 42
elite = 1337
might become: one = 1
ultimateAnswer = 42
leet = 1337
This made me stop column-aligning in most cases. An exception is array initializers for two-dimensional tables with many columns, where the benefit is important enough.Re: Joining the Church of Emacs
#6His alignment formatting example is harder for me to read than what he started with. I have an eye tracking issue so I'm not always the best person to judge this. Is it harder for everyone else?
one = 1
fortyTwo = 42
elite = 1337
To answer your question, I tend to agree that it gets harder to read the wider the horizontal spacing is, unless the relation between the values in the same column is very important.Re: Joining the Church of Emacs
#7Re: Joining the Church of Emacs
#8Re: Joining the Church of Emacs
#9I found it amusing his example of badly formatted code one = 1 fortyTwo = 42 elite = 1337 is exactly how most modern linters want to format my code.
In IDEs that support refactor-renaming (Emacs probably does?), the column-aligned formatting also has the drawback that it breaks (unless the refactoring also auto-realigns all affected code). For example, one = 1 fortyTwo = 42 elite = 1337 might become: one = 1 ultimateAnswer = 42 leet = 1337 This made me stop column-aligning in most cases. An exception is array initializers for two-dimensional tables with many colu…
Re: Joining the Church of Emacs
#10His alignment formatting example is harder for me to read than what he started with. I have an eye tracking issue so I'm not always the best person to judge this. Is it harder for everyone else?
But once you start mixing reallyLongVariableNamesLikeThisOne and shortOnes, the distance between the short variable name and the value is long enough that there's a chance I'll look at the wrong value or something.
I'm glad that automated formatters/linters pretty much all remove/complain about that stuff now days.