from Hacker News

Is there a readability metric for source code?

by aratno on 6/18/20, 3:55 AM with 1 comments

I’m imagining something like the Flesch-Kincaid test for source code: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests

I’m assuming it would have to be language-specific.

This is particularly interesting for contextualizing terse code, like Gocker shared here recently, which may have readability benefits in its brevity that is undone by use of obscure features and structure (like code golf).

Can anyone share existing discussion of this idea?