On 26/11/2016 6:16 AM, Jonathan M Davis via Digitalmars-d wrote:
2. Make the new json be something like std.data.json. We'd already talked
about doing that before. Then the new xml stuff could go in std.data.xml. It
avoids the whole v2 thing by further reorganizing Phobos in a hierarchical
manner.
In the case of std.json, I definitely favor going with the std.data.*
suggestion, since I think that it's cleanest, and it avoids the whole v2
problem altogether. Unfortunately, that still leaves the std.random problem,
since I'm not aware of an equivalent to std.data.* for std.random nor is
there any organizational reason AFAIK to put it somewhere else in the
hierarchy.
So, for std.random, I don't know. The "high-tech" approach has problems
similar to my first alternative with regards to confusion of importing
std.random vs std.random.v2, but it's not as bad with the high-tech
approach, because it's clearly in a sub-package/module rather than
effectively being directly in the same package and getting different
versions based on whether you import the package or the individual modules.
That being the case, std.random_v2 is probably better, but it just seems
ugly IMHO. Then again _any_ solution with v2 is ugly. Long term, we could
alias it to std.random, but we'd have to leave the v2 there or be needlessly
breaking folks code just for a name change. So, the "low-tech" approach is
probably best when it doesn't make sense to move it somewhere else in the
package hierarchy, but I don't particularly like it, and in the cases where
it makes sense to move the module to make it more hierarchical (as seems to
be the case with json and xml), then I favor that approach.
- Jonathan M Davis
std.math.random
Well it does deal with numbers pretty much solely.