That's actually doable... ;) K&R is rather terse, what, 1/5 of Stroustrup or something like that. But I digress.
More on topic: there's also a class of programs that DO come with a book attached - or rather, multiple books, for every level; if not included outright in the distribution then at least linked to in the "learn" tab on a homepage. They're called programming languages. So, it can be done. That's all I want to say.
Programs don't do this, why do you expect every math paper to do it?
> Link to external resources with explanations!
This is called a bibliography, every book that isn't so old that it is the definition and paper includes one. In many textbooks there are also appendices which cover (some of) the foundational material. And most include sections (often in the front and back covers) that show the symbols and their names, if not their definitions.
Well, I don't. It was you moving the goalpost. I talked about "a few pages", and you made "a book" out of it. I simply don't agree with you here and so I have very little to add at this point, sorry.
> This is called a bibliography, every book that isn't so old that it is the definition and paper includes one.
No. Bibliography is like a list of libraries you depend on. It has literally nothing to do with explaining the syntax close to where it's used.
> appendices which cover (some of) the foundational material.
Ha, ha, ha. No. If it's not front and center, then it doesn't count. I'm sorry, but I'm really tired of this subject. I would be willing to compromise more if that wasn't the case, believe me.
> show the symbols and their names, if not their definitions.
Ok. Putting that on the cover is a bit strange, but ok. That's a nice, but very small, step in the right direction. Please iterate and improve upon it!
EDIT: again, because I missed it at first:
> Programs don't do this, why do you expect every math paper to do it?
Programs do come with man pages! And tutorials, interactive tours, contextual help, and more. Emacs comes with 3 books, and a tutorial. (GNU) libc has a book to it. Firefox has a whole portal (MDN) as its documentation. Visual Studio comes with MSDN and a huge amount of explanatory material. And when it comes down to code, you have auto-completion, go to definition, search for callers; you can hover over a symbol and you get a popup with documentation and types; you can also trace execution, stop the execution, rewind the execution (if you have good debugger), experiment with various expressions evaluated at different points.
The most important difference between math and programming (or CS)is that programmers can (and do) build automated tools that help the next generation of newbies get into programming, while mathematicians can't. It's just that they don't want to admit this is a weakness, and only fortify more in their ivory towers.
TLDR: I just can't see how you can even put math papers and programs on the same scale in terms of accessibility!
You are comparing big teams and products to a single guy writing a paper intended for a niche audience and to be read maybe a few hundred times if he is lucky. People makes mistakes and sometimes forget to document everything, they try to document everything though as can be seen in their papers where most things are documented well, but sometimes they miss things and unlike code you don't have compiler warnings telling you about it. And given how few people read those papers it isn't worth investing in a team to go through and update all of those papers to properly add definitions for everything they missed.
The equivalent to those programs in math would be high school textbooks, and they are extremely well documented and easy to read in most cases.