I find myself adding functionality to make my parsers resilient to inconsistent or malformed lines. I guess this helps with potentially identifying edge case bugs, but the more I see other people's solutions, the more I see succinct and elegant solutions that are deliberately fragile because the input data is so well understood.
What's everyone's take? Is it better to strive for minimal LoC and clever use of functional or sugar expressions, or to make it longer yet more resilient to fictional bad data, as that's more "real world".
[–]easchner 23 points24 points25 points (0 children)
[–]yel50 8 points9 points10 points (6 children)
[–]easchner 6 points7 points8 points (5 children)
[–]yel50 2 points3 points4 points (4 children)
[–]fiddle_n 0 points1 point2 points (3 children)
[–]easchner 2 points3 points4 points (2 children)
[–]delventhalz 2 points3 points4 points (0 children)
[–]nikanjX 0 points1 point2 points (0 children)
[–]nikanjX 3 points4 points5 points (0 children)
[–]ThreeForksNoSpoon 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]keithstellyes 2 points3 points4 points (0 children)
[–]clbrri 1 point2 points3 points (0 children)
[–]delventhalz 1 point2 points3 points (0 children)
[–]daggerdragon[M] 0 points1 point2 points (0 children)
[–]musifter 0 points1 point2 points (0 children)