Re: Accessor Methods
"Ed" <iamfractal@hotmail.com> wrote in message
news:1148503280.290367.246190@u72g2000cwu.googlegroups.com...
I just want to see some code that someone thinks is beautiful.
Maybe http://slashdot.org/askslashdot/01/01/25/0230208.shtml but it's a
bit C-centric.
I'm
still surprised at how many questions in the group are not answered by,
"Here's a piece of real, production code that answers your question."
Well, when questions are of the type "how do I get the absolute path of
a file?", then the answer I post are what I would write in production code
too, if my production code called for getting the absolute path of a file.
It's just that it's a one-liner, and doesn't seem to merit being prefaced
with a note saying so.
When questions are of the type "I'm a newbie to threading; how can I
modify this program so it outputs abc123?", I've never been asked in a
production environment to write a multithreaded app which prints "abc123".
So I think the reason you don't see the "here's production code that
answers your question" answer is because the questions being asked don't
lend themselves to being answered in that fashion.
Actually, questions that would warrant the above answer might be of the
type "I need a client-server checkers program using TCP/IP ASAP. Please
e-mail the solution to me by midnight tonight.", which tend to be frowned
upon anyway.
- Oliver