4 ms·
That would be an interesting thing to do. But since code usually has a formal grammar, and a relatively simple one at that, plus a far more constrained vocabula
by rca 13y ago
That would be an interesting thing to do. But since code usually has a formal grammar, and a relatively simple one at that, plus a far more constrained vocabulary and, like you pointed out, stricter style frameworks, the liberty of the author is way more limited. It might be enough to say that a piece of code hasn't been written by someone in particular, or maybe discern an author among a few coders. But I'd bet it can't be done on the same scale as with literature.
- troymc 13y agoOne place where big variations can exist between two programs is in the comments, where vocabulary and grammar aren't as restricted.