JuliaRandom / JuliaRandom/RandomNumbers.jl

Change name of supertype AbstractRNG?

Open
#35 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
100
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I think "re-using" the name `AbstractRNG` is not ideal:
`abstract type AbstractRNG{T<:Number} <: Base.Random.AbstractRNG end`

`AbstractRNG` is defined and exported by `Base` and `RandomNumbers`

```
using RandomNumbers
AbstractRNG
```
results in following:
```
WARNING: both RandomNumbers and Base export "AbstractRNG"; uses of it in module Main must be qualified
ERROR: UndefVarError: AbstractRNG not defined
```

Thus code that uses `AbstractRNG` without `RandomNumbers`, will no longer work when `using RandomNumbers`, without explicitly qualifying. i.e. that code will need modifying.

This can be problematic when one doesn't have access to the modules containing references to `AbstractRNG`.

Maybe this is some form of type piracy?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.