JuliaRandom / JuliaRandom/RandomNumbers.jl

Change name of supertype AbstractRNG?

オープン
#35 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Julia
スター
100
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。