Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused about the package imports #4

Open
mavavilj opened this issue May 5, 2022 · 1 comment
Open

Confused about the package imports #4

mavavilj opened this issue May 5, 2022 · 1 comment

Comments

@mavavilj
Copy link

mavavilj commented May 5, 2022

I am confused about the package imports.

Coming from Python, I am finding it a bit messy to have to do a plethora of imports, whose purposes are not clear to me.

Like in the complete example:

https://github.com/andreaferretti/alea#a-complete-example

As a Nim newbie, I'm not sure why we need the packages future, random/urandom, and random/mersenne. And particularly, why these aren't "baked into" import alea?

@andreaferretti
Copy link
Owner

Because Alea does not contain any Random Number Generator, and it is designed to interoperate with any RNG that you might want to provide.
Import future should now be import sugar: it is just the syntactic sugar for the short form of lambda functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants