4 ms·
... but, most repositories have linters that enforce style uniformity across developers ?!
by toolslive 4y ago
... but, most repositories have linters that enforce style uniformity across developers ?!
- jmfldn 4y agoThat only addresses superficial concerns like formatting. A linter can't rewrite the code and change the style.
- MathMonkeyMan 4y agoI didn't read the whole paper, but a lot of it looks like that.
- jmfldn 4y agoYeah it does to be fair. Code style to me means something more than this.
- DaiPlusPlus 4y agoPerhaps things like casing conventions? That would be covered by a linter too. Or does it mean style-of-semantics (if that's even a thing), for example in C#, preferring to define explicit constructors instead of a parameterless ctor and trusting the user to set properties in the post-ctor initializer correctly? Or use of higher-order/FP techniques (like map/filter/reduce/fold) over explicit for-loops? The summary says this (note the last remark): > The results demonstrate that good programmers may be identified using supervised machine learning models, despite that no particular style groups could be attributed as a good style. Obviously they're not saying, for example, that one particular bracing style is better than another (1TBS tho!), nor that co-incidentally "good" programmers prefer one style over another; but despite knowing what they're not saying, I don't know what they are saying with that...
- toolslive 4y agoIn python, something like "black" will most definitely change the style. Anyway, they looked at C++ code and measured things like the number of tabs, number of spaces, number of white lines, avg line length aso (table 2) Most of which get standardized automatically by the IDE these days.
- PartiallyTyped 4y agoSame with TypeScript and JS.
- deleted 4y ago[deleted]
- 4pkjai 4y agoI'd be surprised if most repositories have linters. I've worked on tons of projects that didn't care about enforcing code style.
- PartiallyTyped 4y agoSame, even in a corporate environment, linters - and even more so linters within the build process - may not exist.