You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in several places of the Julia Manual random number generation is used in examples. We require explicit using Random for those examples to work (now it will throw deprecation warning but in Julia 1.0 those examples will throw an error).
This means that novice Julia users when trying to copy-paste an example will not understand why it fails.
There are three possible solutions:
in the introduction to the manual explicitly discuss this issue and leave the manual as-is;
add using Random in the examples where needed to make them work stand alone;
do nothing (I would not recommend this).
My personal preference would be option 2 (adding using Random where needed to the examples - the downside is adds a bit of noise to the examples), but maybe there are other opinions.
I will make a PR with the appropriate changes when I we have an opinion.
The text was updated successfully, but these errors were encountered:
@fredrikekre I thought that only rand(...) is exported. Now I have checked that also randn(...) can be used without using Random which I did not know (and it is used in several places). So this leaves us with only one line
julia> r = randjump(MersenneTwister(1), big(10)^20, nthreads());
in parallel-computing.md which uses non-exported methods. I will add using Random to this example then.
Currently in several places of the Julia Manual random number generation is used in examples. We require explicit
using Random
for those examples to work (now it will throw deprecation warning but in Julia 1.0 those examples will throw an error).This means that novice Julia users when trying to copy-paste an example will not understand why it fails.
There are three possible solutions:
using Random
in the examples where needed to make them work stand alone;My personal preference would be option 2 (adding
using Random
where needed to the examples - the downside is adds a bit of noise to the examples), but maybe there are other opinions.I will make a PR with the appropriate changes when I we have an opinion.
The text was updated successfully, but these errors were encountered: