[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to change the function behavior at run-time in luav5.1.4
- From: 刘小凡 <zhqqmao@...>
- Date: Thu, 28 Jan 2010 10:09:47 +0800
The origin of the problem is due to the early days of the code often are difficult to detect low-level errors, such as spelling errors, simple logic error, many of these errors can be reflected only in the run-time. Therefore developers may need to restart the server to reload all the scripts, to restore its original state, this process is too cumbersome! So want to dynamically change the behavior of a function to make to reduce the number of restart. For a direct call function is no problem, as long as the dofile a function of where the script can be, but for some functions to save the old reference to the place where the powerless, so moved to change the idea of a proto. We just reduce the development period to a number of low-level error and the trouble is not intended to be used in the operation period. And like all the developers of transparency, does not change the existing code style and developed.
To Drake Wilson:
Thank you for your warm and detailed answer, it gave me a lot of inspiration.