Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> treating regex like it's normal code despite the fact that regex could match a keyword easily

I'm confused by this statement. So you could match a Perl keyword with that regexp? What about it?

> It's mixing looping logic with exception logic

It depends on the context, but that's five lines of readable code. Exposure to 20th-century codebases may have lowered my standards, but I don't find it particularly shocking, especially for something that looks like a quick text file processing script. What do you suggest that makes for better code?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: