4 ms·
Let's discuss one situation at a time. Which one bothers you most? The reader, the iterator, the generator or the list of entries? Give me one practical example
by yegor256a 12y ago
Let's discuss one situation at a time. Which one bothers you most? The reader, the iterator, the generator or the list of entries? Give me one practical example of that -ER object and I'll show you how it can be refactored to get rid of this suffix and become more object oriented.
- dalke 12y agoIs this a delaying tactic? I started with the reader, I gave working code named PasswdReader. You suggested the alternate name PasswdList so I replied with something that was a better fit to then name PasswdList, in large part because it had list-like performance characteristics. I think it's safe to assume that "reader" is the one that 'bothers me the most'. As for "practical", it's a simplification of code I use for parsing a chemical structure file into a sequence of records/molecule objects. I simplified it so it would fit in an HN comment and not require specialized domain knowledge. It does reflect the true intent of practical code. I'll be surprised if you can come up with a better name for "-Reader". Once that's done, I would like to read about your alternative name for "generator". But I can point to read-world OO interfaces like ANTLR at https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Parse+Tree+Listeners https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Parse+... which uses "ParseTreeListener", "JavaLexer", "JavaParser", and "ParseTreeWalker". It's much easier for me to believe you don't know what you are talking about than to believe that all of these "-er" classes reflect bad OO design.