|
On 20/05/2020 15:24, Ahmed Charles wrote:
On May 19, 2020, at 5:09 AM, Lorenzo Donati <lorenzodonatibz@tiscali.it> wrote:
[snip]
Otherwise a user could not tell if the built-in generator is good for their application, bar knowing it's no good for crypto stuff.I think that if you’re wanting to display a random quote from a list (like fortune), the current info is just fine. And if what you want is more complex than that, you probably want to pick a specific solution or at least read the source. I don’t think Lua benefits much from over specifying the implementation details of random number generation. Ideally the source would have comments about the algorithm with links to more info, but the manual is better of being vague here, in my opinion.
The problem here is that I think the manual is giving either too much or too little information.
If you want to completely hide implementation details you don't state: "The results from this function have good statistical qualities,"because this sentence has meaning only for people who /do/ want some more info about the quality of implementation.
So, IMO, you either expunge that reference about quality altogether, or provide at least some /precise/ reference. And I don't think people /using/ Lua should all be able to search for that info in the C source.
BTW, Lua could be embedded in an application who only provide a link to the user manual. A interested user (which could not even be a programmer) should be able to "follow the link" and discover at least the name of the algorithm used, without the need to even think of downloading the source just to see if they can find something somewhere in a cryptic C file comment!
Otherwise, as I said, just avoid mentioning the quality issue at all, because as it stands that sentence is useless except for a very narrow category of people, i.e. Lua developers that are also expert C programmers AND that have interest in random number generator quality.
Anyway, I would much prefer that little bit of added information. After all it is Lua /Reference/ Manual, it should give references to a Lua programmer/user without forcing him to learn C.
-- Lorenzo