|
|
|
|
|
by sverhagen
1319 days ago
|
|
In circumstances, and depending on configuration, the code formatter tool may still aim for alignment, such as assignment operators on subsequent lines. Whether you like that or not, for me the question still stands: how does that jive with "almost monospaced". |
|
Things like
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
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.