|
|
|
|
|
by pmontra
1319 days ago
|
|
I've been using proportional fonts in programming for about ten years. I stopped doing things like abc = 1
d = 2
which add very little readability value IMHO.Things like func(arg1,
arg2,
arg3)
usually don't align well because func( has a different width than the five spaces in the lines below. However1) my text editor (emacs) aligns those lines for me (probably any programmer's editor does) so at least I don't have to do precision work 2) I ended up writing code like func(
arg1,
arg2,
arg3
)
especially with named arguments (arg=value). That aligns even with proportional fonts and all arguments immediately stand out.If the arguments are few (two or three) and there are no named arguments I don't break them on multiple lines. The result is that no coworker ever complained about my code. Languages with a formatter (Elixir) solve the problem once and for all and align well with both kinds of fonts. |
|