For example in LOGO, you’d just write
forward 10
left 90
In comparison, call paint.forward(10)
call paint.left(90)
seems excessive and noisy.For example in LOGO, you’d just write
forward 10
left 90
In comparison, call paint.forward(10)
call paint.left(90)
seems excessive and noisy.Even though technically we could make forward() a method at the top level in the context of a paint program, we chose to make things more OOPy to prepare them for later when students get to the 2D game engine and there can be multiple sprites to control.
Edit: well actually, I want a whole development studio like this for professional development. You are the closest of anything else to my vague idea of what programming should look like. I feel bad for the kids who later will have to move from this to what we call "our software development stacks".
:= is Algol's. Algol had a much bigger European influence than American, and other euro languages like Pascal followed its traditions
TCL ftw!
call paint.draw(10)
call paint.rotate(90) // or even rotate("up")
speaks better to me.Python also comes with an implementation: https://docs.python.org/3/library/turtle.html
I agree that the paint prefix doesn’t quite match that conception.
N.B.: I'm using one-based indexing for my links here because that's apparently what early BASICs used [2] :)
[1] https://picaxe.com/basic-commands/program-flow-control/gosub...
[2] https://alandix.com/blog/2021/07/27/a-brief-history-of-array...
PRINT "Hello"
and not GOSUB PRINT "Hello"
Rather, you'd write GOSUB 690
to run your subroutine that starts at line 690. LET X=10I remember that when I had to enter code printed in magazines/books it always seemed the Spectrum was the one that required that particular modification.
(Usually there would be a BASIC listing with modifications for C64, BBC, Spectrum, and other systems. "On line 30 add LET", etc.)
</s>
Totally agree, it was my first thought too on call/var nonsense.