Closed ghost closed 4 years ago
No no, there is already this module, and later the standard library one was added.
Thanks Oleh. But what I mean is this: I have a Nim installation which includes already a random
module. Then additionally I install your library with the same name. Which one will be taken when I write import random
in my source code?
That is true, and I don't know :( It is problematic indeed.
I'm surprised there isn't an issue about this because it had been brought up.
I can see that your library is loaded but I don't know why. Skimming through the system nim.cfg
file I would actually expect the standard library to be loaded.
Is just funny that you don't know either. Obviously it worked in the past. Should I close the issue or do you think it needs more investigation? I could ask in the Nim forum. Maybe someone there knows a reasonable answer.
It worked in the past when there was no such standard library module. By the time it was added I wasn't really working on this lib anymore.
It is a real issue, though, so no need to close.
https://forum.nim-lang.org/t/5963
You can choose via import std / random vs import pkg / random.
Maybe documentation needs updating.
Sorry for the newbie question. But there is already a
random
module in the standard. Which one will be taken by definition? Are there any rules? Maybe in thenim.cfg
file?Thank you.