4 ms·
It is so much better idea to use meta-programming to solve this problem – https://github.com/excilys/androidannotations/wiki/Injecting-Views https://github.com/
by vgrichina 14y ago
It is so much better idea to use meta-programming to solve this problem – https://github.com/excilys/androidannotations/wiki/Injecting-Views https://github.com/excilys/androidannotations/wiki/Injecting...
- cheald 14y agoIndeed. It's likely just my Rubyist side talking, but the OP's example sets off my DRY alarms something terrible.
- MaulingMonkey 14y agoThis. I don't mind writing this code from a mechanical perspective (copy, paste, and a few single-token replacements per line) nearly as much as I mind reading, debugging, and being forced to rewrite this kind of nauseatingly boilerplate code. Ironically, my most recent use of regexps has been finding such boilerplate and simplifying it by using newer, cleaner APIs so I can remove the old terrible ones. Let Regexes Delete that code for you.