Discovered: Dec 1, 2022 19:46 What I Want for Code in Textbooks · The Third Bit <– QUOTE: For example, suppose I want to include a snippet of code in an explanation—not an entire class or function, but just a few lines or a method. I can’t do this with computational notebooks: so far as I can tell, they all require cells to be runnable as-is, which means I can’t have just a few key lines from the middle of a function or one method from the middle of a class. Similarly, suppose I want to show a class with placeholder ellipses instead of the method bodies so that readers can get an overview of what’s where before we dive into specifics. Again, the tools that let me run code in situ don’t allow this... It’s all technically feasible, particularly if someone wants to leverage an existing platform like VSCode. I don’t expect to see it in my working lifetime, but I do still hope that programming will some day free itself from backward compatibility with punchcards and all the misery that antiquated constraint causes. <-- Amen!

Leave a comment on github