3 ms·
Doesn't Pascal have libraries for sorting? I find that hard to believe. So there must have been another reason why Knuth chose to implement everything from scra
by Tichy 14y ago
Doesn't Pascal have libraries for sorting? I find that hard to believe. So there must have been another reason why Knuth chose to implement everything from scratch. Probably to demonstrate programming techniques. You don't learn that much about algorithms by stringing together a couple of shell commands.
- to3m 14y agoPascal makes code reuse hard. http://www.lysator.liu.se/c/bwk-on-pascal.html http://www.lysator.liu.se/c/bwk-on-pascal.html puts it better than I could. And when I used Pascal in the early 1990s - and this was Borland Pascal, one of the better ones - it even had strings! - things had not improved massively.
- Tichy 14y agoWhen did that comparison take place anyway? I don't think anybody is still using Pascal in this day and age?
- to3m 14y ago1980s, I think it says? At any rate, my point, though it wasn't really clear, was that pascal makes code reuse hard to such an extent that I don't think it's actually possible to have a general-purpose sort routine in the library that would be actually useful. Certainly nothing like qsort, anyway. It just can't be expressed. (I'm sure modern versions of Pascal have this problem licked.)