Re:C0, an Imperative Programming Language for Novice Compute...
by tinalumfoil on Wednesday October 18, 2017 @03:30PM
(#15502179)
> 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.
Re:C0, an Imperative Programming Language for Novice Compute...
by khedoros1 on Wednesday October 18, 2017 @05:38PM
(#15503401)
Instruction 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.
Re:C0, an Imperative Programming Language for Novice Compute...
by XorNot on Wednesday October 18, 2017 @06:31PM
(#15503837)
Not 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).
Re:C0, an Imperative Programming Language for Novice Compute...
by khedoros1 on Wednesday October 18, 2017 @08:24PM
(#15504481)
Depends 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.
Re:C0, an Imperative Programming Language for Novice Compute...
by eru on Thursday October 19, 2017 @08:10AM
(#15507184)
Yes, 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.
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).