Am 27.12.2016 um 11:51 schrieb Duncan Jones:

On 27 Dec 2016, at 10:29, Gilles <[email protected]> wrote:

Hi.

On Tue, 27 Dec 2016 09:54:29 +0000 (UTC), [email protected] wrote:
A string of length zero hardly qualifies as random.
Shouldn't "generate(0)" rather raise an exception?
[I know that "nextInt(1)" is also not random, but what applies to a
general-purpose low-level utility might not be the best option for
applications that would use TEXT.]
I was following the Robustness principle. Asking for a zero-length string is 
odd, but as there was a way to interpret that request without throwing an 
exception, I did so.

+1 When generating strings with a random length (e.g between 0 and 10) asking for a zero length string is not so odd.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to