Consider that classic programming language of old - LOGO.
It's a really neat LISP. Yes, a LISP.
to factorial :number
if :number = 1 [output 1]
output :number * factorial :number - 1
end
or...
to reverse :stuff
ifelse equal? count :stuff 1
[output first :stuff]
[output sentence reverse butfirst :stuff first :stuff]
end
From
https://el.media.mit.edu/logo-foundation/what_is_logo/logo_p...And from https://dl.acm.org/doi/pdf/10.1145/3386329
Logo’s design drew upon two theoretical frameworks: Jean Piaget’s constructivism and Marvin Minsky’s artificial intelligence research at MIT. One of Logo’s foundational ideas was that children should have a powerful programming environment. Early Lisp served as a model with its symbolic computation, recursive functions, operations on linked lists, and dynamic scoping of variables.
....
In LCSI Logo, the if instruction above becomes a call to the if procedure, which takes three inputs:
if :x<0 [right 90] [left 90]
The first input is a Boolean value, reported by the < procedure. The second and third inputs are instruction lists, only one of which will be evaluated by if depending on the value of the first input. Square brackets both delimit and quote a list, so [right 90] is equivalent to ’(right 90) in Lisp. The entire expression is therefore equivalent to
(if (< x 0) ’(right 90) ’(left 90))
in Lisp notation. How can Logo represent a thunk as merely the text of its body, without wrapping it in a lambda expression to capture its closure? See Dynamic Scope below (Section 3.7).
The use of quoted instruction lists didn’t start with LCSI. From the beginning, the main looping facility has been
repeat 4 [forward 100 right 90]
with the instructions to be repeated inside square brackets.
----
LOGO was secretly introducing us to lambdas and thunks and closures... back in 3rd grade on the Apple][+.
One of my laments is "I wish that we had computer scientists teaching us LOGO back then rather than the librarian who just wanted some quiet while we played Oregon Trail."
So... the weird characters? We dealt with them as kids, that's no weirder than LOGO.