Re: [swift-dev] Random() in the standard library

2016-07-04 Thread James Andrews via swift-dev
Hi All, Thanks a lot for the quality feedback. I think that not only answers my question, but has also swayed me in the direction of not having Random() in the standard library. At least for now. My original thinking was along the lines of what you suggest in that leaving it out might encour

Re: [swift-dev] Random() in the standard library

2016-07-04 Thread Gwynne Raskind via swift-dev
C++11 defines PRNGs in the STL, but even then the API is fairly complex thanks to the need for so many different options for source, distribution, seeds, security... - and it *still* doesn’t cover all of what I consider the obvious cases (YMMV). I agree with Robert here, Swift isn’t ready to ha

Re: [swift-dev] Random() in the standard library

2016-07-03 Thread Robert Widmann via swift-dev
Trouble is, most modern languages disagree with that and have chosen to split them out of their standard libraries. - Rust https://github.com/rust-lang-nursery/rand - Go https://golang.org/pkg/math/rand/ - Dart https://api.dartlang.org/stable/1.17.1/dart-math/Random-class.html - Elm https://githu

Re: [swift-dev] Random() in the standard library

2016-07-03 Thread James Andrews via swift-dev
Thanks for the feedback. I agree in that I believe the standard library should be able to grow. I think a PRNG implementation is a sufficiently “atomic” building block to be included in the standard library for a modern language these days.  As to the implementation, would it not be foolish to

Re: [swift-dev] Random() in the standard library

2016-07-02 Thread Austin Zheng via swift-dev
I am also just a random guy, and I agree with much of what Brent says, but my personal opinion is that the standard library should be allowed to grow in the future to encompass areas whose generality and usefulness are comparable to those of current standard library constructs. I would consider

Re: [swift-dev] Random() in the standard library

2016-07-02 Thread Brent Royal-Gordon via swift-dev
> On Jun 24, 2016, at 6:38 AM, James Andrews via swift-dev > wrote: > > Is there a reason why random() is missing from the standard library? Is > it just a matter of someone implementing it? (Note: I'm just a guy, not someone in a leadership position.) Random number generation is surprisingly

[swift-dev] Random() in the standard library

2016-06-24 Thread James Andrews via swift-dev
Hi, Is there a reason why random() is missing from the standard library? Is it just a matter of someone implementing it? Thanks, James ___ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev