6 ms·
> If your average line of code is wider than 80 characters, it's likely you have some other, bigger coding style problems In math-heavy stuff, lines tend to be
by rmrfstar 6y ago
> If your average line of code is wider than 80 characters, it's likely you have some other, bigger coding style problems
In math-heavy stuff, lines tend to be longer. You are usually trying to convert one line of math into one line of code. I myself shoot for 160 character columns.
See, e.g. [1].
[1] https://docs.fast.ai/dev/style.html https://docs.fast.ai/dev/style.html
- ogre_codes 6y agoI agree, math is a perfect example where code is more clear to have a single long statement on one line. I am a bit skeptical that you have a big codebase with math on more than a quarter of the lines of code though. Most likely there are a lot of shorter lines between your formulas which is exactly my point here. When long lines improve readability/ clarity you should have the ability to use them.