You should look at Distributions.jl, which already overloads rand to provide the functionality of the first two methods of "random" that you want. On Apr 27, 2015 8:10 PM, "François Fayard" <[email protected]> wrote:
> Hi Stefan, > > I am just expressing my point of view here as a Mathematica user. > > [1] One can't compare Julia and C. C is one of the smallest language than > can exist. Therefore, small names are not too much of a problem. Julia aims > to be a langage with a huge standard library (kind of "batteries included") > which makes it a totally different beast than C. If you look at C++ that > has a bigger library, names are more consistent. The larger the library, > the more consistency is needed. > [2] I think that Matlab gets a lot of things wrong, and its naming > conventions (of lack thereof) is just nightmare. For instance why not > working on something as: > - random(distribution) : gives a random number > - random(dimension, distribution) : gives a random matrix > - random(sparsity_pattern, distribution) : gives a random sparse matrix > I think it fits nicely the dispatch method of Julia which is very closed > to what Mathematica does. > > On Tuesday, April 28, 2015 at 1:01:44 AM UTC+2, Stefan Karpinski wrote: >> >> I'm not sure what the problem with sprandn is. If you're working with >> sparse matrices, you'll know what this is. If you're not, then you're >> unlikely to accidentally use it. Sure, it's kind of an ugly name, but it's >> the traditional, well-known name for this function. I don't see anyone >> complaining about cryptic but standard names inherited from C. >> >
