I cannot understand your offensive stand. I have many things to say:
I agreed with you that this could bring some (rare) problems if the programmer is not careful enough when writing his own libraries, so I did my best to isolate the different chunks. But now you want the "require" command to load the symbols locally in a function?! I designed "require" exactly like the "#include" facility in C/C++, you have to write it at the beginning of every chunk, and it concerns the whole chunk.
Indeed, you did your best to implement isolation of chunks, and I'm satisfied with the result of your work. What I said about the "per function" (not "per chunk") isolation was just a remark.
Can I make some remarks or not? I never said that it's very important, and I never said that it is quite necessary to implement it in CPLua. But I'm not exagerating. The "per function" isolation makes the code clearer, it's easy to realize why. But I
already said that I can live without it.
You said that you realize that it could be difficult to implement, but I'm not sure that you realize how much this could be difficult.
Don't be so sure. I'm a programmer too, you know. I'm not developing CPLua, you do that, but I'm programming in several languages for years. I think that I can
easily realize that "per function" isolation is really difficult to implement.
About the "math", "table" libraries: You are trying to prove that I said I want to load the basic libraries everytime I need them. That's not true. You probably didn't understood what I was saying, or I was not clear due to my poor english, or both. But the fact is that I
never said such a thing. Since Lua is directly related to C, the "math" library has only a few,
very primitive mathematical functions. Data hiding does not means that even primitive things are hidden. Again, I already said that it's not so important to me. But imagine a new programmer who is trying to write a simple program that computes 2^3 in Lua. He will get an "encrypted" error message. What he will do next? He will realize that the "math" library is needed, or he will be disapointed? I think that he will uninstall CPLua immediately, and he will lose the opportunity to write Lua programs, just because the "math" library is not autoloaded.
First, the way that I implemented it corresponds to the arguments given in Chapter 15 of the book. Second, why are you saying that now ?
First, the book is not the bible, including Chapter 15
. Second, I'm saying that now, because I
now realize that it can be implemented in a better way. I'm trying to test everything in time, but I also have other things to do.
Do not forget that this is not obligatory because Lua is powerful enough to permit it without any changes, and that for now you are the only one here wanting that to be implemented.
I know, I know. But I don't like the "you are the only one here" thing. I'm trying to help the developement of the project, simply because I need a powerful programming language on my ClassPad. I think that I have several useful things to say. If I'm bothering you, just tell it. I can stop posting anything if you like. Furthermore, it seems that, unfortunately, only a few people are currently testing CPLua, and posting anything helpful here. Sadly, "the only one here wanting this or that implemented" is
very close to "the only one" in general.
Good point, I forgot about it. This is an example of feature that was added as "global" by lua, and that I had to change (difficultly) as local for each chunk.
Sorry for the "fatal error" bug, I will see what's happening.
I have a feeling that we will see version 0.61 soon. It's natural, a new version with big changes has always some ugly bugs burried here and there.