On Wed, 2004-04-28 at 10:01, Jens Rieks wrote:

> Thats the reason why we have a "Random" PMC (classes/random.pmc).
> 
> I'am still not sure if we need an rand/srand OP for random numbers. As you 
> already mentioned, srand uses a global state and I belief that it will cause 
> trouble earlier or later.

If you check out the patch, you will notice that the Random PMC
(enum_class_Random) is the underlying implementation. This is just a
functional interface. There is no state actually maintained in these
functions.

The reason for the ops is to avoid having 99 of 100 mathish functions in
your native language defined as:

        foo: emit_parrot("foo", return, args)

but rand defined as:

        rand: emit_parrot("set", return, "Random")

It's just a potential point of confusion.

-- 
Aaron Sherman <[EMAIL PROTECTED]>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback


Reply via email to