Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Languages should be small, libraries should be big.

The standard library should be comprehensive and well documented so that it's easy to (1) decide if there's a package that does what you want, and (2) work out how to use it. Simply documenting all the functions/methods on an API is not enough; documentation should start by saying what problems the module is trying to solve, then give some worked examples. If the worked examples don't give a bloody good idea of how to use it, then probably either the package is badly designed or the documentation badly written.

There are libraries in Python that I have given up on using simply because I've not been able to figure out how to use them.



It is not very clear what is "language" and what are "libraries", in a conceptual sense. For example, you can build Common Lisp from a handful of things / special forms, but the ANSI standard is very large, because it wanted to standardize a lot of things that could be built in many different ways (e.g. the loop facility).

Basically, the difference between "language" and "library" is normative. What you put in "language" are requirements for conforming implementations. It is a political decision more than a technical one.


> What you put in "language" are requirements for conforming implementations.

That's a language definition, not a language. Consider a language L which is implemented in implementation language M.

Stuff that's written in L is part of the satndard library. Stuff that could have been written in L but is written in M (e.g. for speed) is part of the language. And stuff that is written in M is also part of the language.


I like the idea of many small special-purpose languages. In that view, a language or an API (to some specific library) has the same goal: expose some functionality to the programmer. The nice thing with a specific language, is that it can be tailored, syntactically, to the purpose of the 'library'. It's a bit more work to wrap those functionality into a language instead of just an API, but I believe the amount of learning one would be in favor of the language kind.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: