JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.97k stars 5.5k forks source link

How should the stdlib be structured: base, extras, etc. #723

Closed ViralBShah closed 12 years ago

ViralBShah commented 12 years ago

The current system of base/ and extras/ is a bit confusing.

I propose that base/ be minimal and simple, and free of much of the stuff from external, making it easy to build julia.

The rest of the standard library can be in stdlib/, which consists of tested and documented code. Much of the code that uses external libraries can be in stdlib/.

There can be a staging/ area, where things can bake. We can do away with extras/, which currently have some stuff that should go into stdlib/, and some stuff that ought to become external packages when we have a package management system.

JeffBezanson commented 12 years ago

Seems ok. Basically this amounts to splitting extras into stuff that is well tested and documented, vs. stuff that isn't.

Some stuff in external is important, and we probably can't move it out of base: llvm, readline, unwind, pcre, grisu, dsfmt, openblas, lapack (maybe fftw too). That's still a fair number of packages.

JeffBezanson commented 12 years ago

Actually I think the phrase "standard library" should refer only to base, and everything else is a package. Package maturity can be measured with a version number instead of a staging directory. The names are less important than the organization; we could I guess decide to bundle a bunch of stuff currently in extras into a package called stdlib, but that doesn't seem so great since it wouldn't be clear what does and doesn't belong in there. @StefanKarpinski what do you think?

ElOceanografo commented 12 years ago

For reference and comparison, I just pulled together everything that shows up in the top namespace for Octave, Python after from pylab import *, R, and Julia:

https://github.com/ElOceanografo/julia/blob/master/scratch/standard_libs.csv

I haven't gone through to find all the functions in common, but its interesting to see how much is there for each language. Octave has 1,378 names, Pylab has 947, R has 498, and Julia has 1,775 (though a lot of those are global constants and things, not functions).

JeffBezanson commented 12 years ago

Interesting. I expect ours to go down significantly when we have the ability to hide private symbols, such as all the _jl_* names.

6e441f9c commented 12 years ago

When there are namespaces, life will be much simpler, true...

So, if I have a small integer-factoring function, where should I put it? Shoud I create staging/ already?

StefanKarpinski commented 12 years ago

I would say either in intfuncs.jl or combinatorial.jl. We can review and merge when it's ready.

ViralBShah commented 12 years ago

We pretty much have a reasonable convention shaping up here, and at this point, no major decision seems to be necessary. We can reopen this, if necessary.