guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improve `seed->random-state' in stable-2.0?


From: Mike Gran
Subject: Re: Improve `seed->random-state' in stable-2.0?
Date: Mon, 23 Jan 2012 22:08:33 -0800 (PST)

> From: Andy Wingo <address@hidden>
> That would indeed be a mean thing to do!  It's not what I'm suggesting
> though.  Deprecation means causing Guile to emit warnings, at
> compile-time or at runtime, indicating that a particular interface will
> go away at some point, and noting the interface that should be used
> instead.
> 
> I think it's fairly helpful, actually, but if you have any suggestions

> for how it could be improved, they are much welcome.


My beef is with potentially removing the ability to use an integer seed in 

seed->random-state.  It is useful and common.  Many other languages
and schemes do it the same way.  Its strengths and limitations are
indicated in the manual.  


I could make a technical argument about why this procedure's calling
structure w.r.t. integers shouldn't change: but the technical argument
would just be an attempt to justify my personal opinion that a documented
API that I have used in scheme code that currently works fine shouldn't be
broken.


This is orthogonal to the bug in the procedure, though.  A user should
be able to expect the for each integer seed between 0 and 2^N,
for some value of N, that the PRNG will return a different series.
It works that way in most languages that allow integer seeds.
Thanks,

Mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]