4 ms·
These days the sequential execution of instructions is a convenient lie at most. BASIC is one way. But you can also start with 'How to Design Programs' approa
by eru 9y ago
These days the sequential execution of instructions is a convenient lie at most.
BASIC is one way. But you can also start with 'How to Design Programs' approach and start with Racket (http://www.ccs.neu.edu/home/matthias/HtDP2e/Draft/index.html http://www.ccs.neu.edu/home/matthias/HtDP2e/Draft/index.html).
- tinalumfoil 9y ago> sequential execution of instructions is a convenient lie at most Could you expand? Obviously some processors reorder instructions and try to do things in parallel, although this isn't true everywhere and the model of sequential instructions is still valid.
- khedoros1 9y agoInstruction reordering, branch prediction, speculative execution, and optimizing compilers would all be examples of details that are abstracted over by the model of sequential instructions. "Lie" might be too strong of a word, but "simplification" would be accurate. And sometimes that abstraction is leaky.
- XorNot 9y agoNot to anyone working in BASIC. And probably more importantly, they're implementation details: you can't feed a modern processor out of order instructions, the entire system is built and optimised to efficiently execute sequential programs (but possibly several of them concurrently).
- khedoros1 9y agoDepends on the BASIC. Some varieties are compiled and have modern optimizations. > And probably more importantly, they're implementation details Well, right, programming languages are abstractions built on top of the actual implementation.
- eru 9y agoYes, BASIC is an abstraction that hides eg instruction re-ordering. But if you are working with abstractions anyway, then imperative programming loses that claim to a privileged position.