From: "Jesús Gabriel y Galán" Date: 2010-06-15T16:34:49+09:00 Subject: Re: Metaprograming On Tue, Jun 15, 2010 at 1:21 AM, Rein Henrichs wrote: > On 2010-06-14 10:36:57 -0700, Jesús Gabriel y Galán said: > >> Of course, it might very well be the case that to solve OP's problem, >> this is not necessary at all and that studying his original problem >> might lead to a different solution, but in any case I see no harm in >> explaining him method_missing and how to define methods. Feel free to >> ask him about what problem he is trying to solve, and maybe we can >> come up with a better solution. >> >> Regards, >> >> Jesus. > > Agreed. I would prefer that we attempt to understand a bit more of the > context of the question. > > Rant follows: > > Questions like these are often the result of something like the > Dunning–Kruger effect, where the questioner may not know enough to know that > the question is bad and may only receive a confusing or misleading answer. > For example: > > A: "How can I get more angular velocity out of this screwdriver?" > > B: "Um, just twist it harder." > > A: "Ok, that isn't helping me drive this nail in." > > B: *facepalm* "Oh, you should be using a hammer." > > TL;DR: Why does OP want to define methods dynamically? What business value > would this provide? I agree, let's wait for him to answer about the original purpose of his requirement. On the other hand, I think both things have value, because there was clearly lack of knowledge that could be addressed, and I think that providing that information could also help. Maybe, as you say, not in this specific case, but to make the OP more knowledgeable (sp?) about the language. Jesus.