Hacker News new | past | comments | ask | show | jobs | submit login

I've seen something similar to the "junction" example someone mentioned in Perl 6 used, where a function that (with some justification) would allow multiple passwords for a given user to be valid set up a value that would compare equal to multiple things, then check in a single == with the password whether it was valid.

I eventually nuked it and replaced it with the obvious for loop, which given as I also got to nuke the implementation of the class in question, meant a significant net reduction in line count, one less file in the repo, and one less wart in the code for new developers to stumble over.




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

Search: