4 ms·
Interesting that the shortest (and among the most readable) is the 15-line version written in old-school AWK: http://pacman.blog.br/wiki/index.php?title=Um_Corr
by rayval 16y ago
Interesting that the shortest (and among the most readable) is the 15-line version written in old-school AWK:
http://pacman.blog.br/wiki/index.php?title=Um_Corretor_Ortográfico_em_GAWK http://pacman.blog.br/wiki/index.php?title=Um_Corretor_Ortog...
A surprise is that the Perl implementation weighs in at 63 lines. I would have expected much less. I expect a much shorter version is possible, relying on idiomatic constructs at the expense of readability.
- tedunangst 16y agoIf you run a2p on the awk, then remove some boilerplate and unformat as per the original, you end up with only about 18 lines of perl.
- abecedarius 16y agoI like awk (and used it a lot 15-20 years ago), but that code to my eye is oversqueezed and hard to read.
- joshu 16y agoThat's perl6, btw...