Adding new methods at runtime to a class

val val at vtek.com
Mon Nov 24 21:26:18 EST 2003


Rene(>):
> >and you don't have a luxury to design and build your program ahead.
>
> You mean in the real world programs are build afterwards?

i meant that in the real world programs are built *on-the-go*.
    This is how my dog does it: i was innocently kicking a ball
against a wall;  the dog enjoys to play ball on a field,
but this time, when chasing the ball, she was lost when
the ball kicked off the wall under 'strange' angle.
After a couple of failures, though, she was waiting a split
second (instead of immediate chasing), and then intercepted
the ball reflected from the wall.  I didn't realized
first that she discovered Snellius Law ("incident angle is
equal to reflection angle") in matter of seconds
(in my time, i spent painful hours for the same).
    In other words, she tested-and-debugged-on-the-go
her old chasing program after a couple of trials-and-errors
running it.  Sounds like extreme programming... (jump first
and then think).
    [she expressed no interest in OOP, though, so i'm not sure
if she did add new methods at runtime :) ]

> >You still can analyze the current (run-time) situation and build
> >your response on-the-fly, dynamically.
>
> Right. Firtst let it run, than implement it once its running, and finally
> design it when its done :-)

Sounds good and does work (see above).
BTW, your receipe is exactly the basic rule of proposal writing -
send-and-get-it when all is already done.

extreme-ly y'rs,
val


"Rene Pijlman" <reply.in.the.newsgroup at my.address.is.invalid> wrote in
message news:ja75svsucikfd96oaejq5dh7clmafsutme at 4ax.com...
> val:
> >In the *real-world* programming, including embedded systems and
> >environment-driven systems, often you have no idea what may
> >happen next
>
> This is true.
>
> >and you don't have a luxury to design and build your program ahead.
>
> You mean in the real world programs are build afterwards?
>
> >You still can analyze the current (run-time) situation and build
> >your response on-the-fly, dynamically.
>
> Right. Firtst let it run, than implement it once its running, and finally
> design it when its done :-)
>
> --
> René Pijlman






More information about the Python-list mailing list