Julia: rename `rand` to `random`

Created on 11 Mar 2020  路  6Comments  路  Source: JuliaLang/julia

in the julian spirit of not abbreviating things (e.g. https://github.com/JuliaLang/julia/issues/31643). obviously can't happen before 2.0. apologies if this has been discussed before and i missed it.

RNG

Most helpful comment

rand has been used in many languages and I don't think it's overly obscure. This would be a really spurious change.

All 6 comments

rand has been used in many languages and I don't think it's overly obscure. This would be a really spurious change.

Also, what about related functions? randomnormal, randomexponential, sprandomnormal (or is it sparserandomnormal ?) etc. (unless these are suppressed in 2.0 in favor of rand(om)(Normal()) etc, but this will probably not happen).

rand(om)(Normal())

image

i value consistency in naming conventions over conforming to convention in other languages. two extra letters is not that much more verbose. julia is a "fresh approach" afterall-- perfect opportunity for change.

Perfect consistency in this regard is not attainable. Are we really going to stop using abbreviations entirely?

This churn here is unlikely to be worth it. Don't think this needs to be kept open.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manor picture manor  路  3Comments

arshpreetsingh picture arshpreetsingh  路  3Comments

iamed2 picture iamed2  路  3Comments

musm picture musm  路  3Comments

StefanKarpinski picture StefanKarpinski  路  3Comments