Bakul Shah writes: > random(3) also provides an initstate() call which presumably > allows you to change the amount of randomnes. So here is > another suggestion: why not fold your algorithm change in > that function? For example, > > initstate(seed, "RC4", 3); > > changes the algorithm to RC4. Yes, this is a change in the > interface but one I am sure most people can live with.
No. Evil interface change. #ifdef hell while programs try to figure out OS differences. If an os provides a function, that function should be as good as possible while not breaking standards. We have lousy functions like gets(3), that we have to keep because the standards say we do and programmers keep on writing code that uses them. rand() and random() have a docimented interface, and empirical programmer expectations about their outputs simply result in bad code. > > > There is an expectation that on subsequent releases of the > > > same OS things continue to work. > > > > Where is that expectation guaranteed? > > Where is that expectation supported? > > This expectation is a reasonable one. Most commerical OSes > do a good job of maintaining compatibility. IRIX certainly > did a pretty good job of it. FreeBSD also does a pretty good > job on the whole. "Reasonable" is an opinion. It is not shared by me. :-) Irix was well known for its bugs. M -- Mark Murray iumop ap!sdn w,I idlaH To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message