4 Comments
User's avatar
pootietangus's avatar

> Textual programming languages are a 1960s implementation of a 1430s invention called Gutenberg Typesetting

> Why can 5 year olds understand and learn hard real-time notation (sheet music, music lessons), yet, PhDs think that this is a hard, complicated problem?

Are you saying that programming is missing the equivalents of the 5-line staff and the integral sign? Basically, more compact and/or spatially oriented ways of reading/writing programs?

Expand full comment
Paul Tarvydas's avatar

I think that it is more than just visual presentation. Sheet music specifies control flow in more ways than FP does. FP restricts control flow to sequential line-by-line stepping and blocking on function calls, which are themselves just sequential line-by-line stepping - essentially dynamic macros that effectively expand into sequential, line-by-line stepping within the calling function without locality-of-reference / predictability of how many levels of expansion (calling) might be involved. FP complicates understanding using infinite regress. Sheet music specifies time signature, event-beginning and duration (relative to time signature), repeat and GOTO (coda). Sheet music notation covers all of that in a way that is sufficiently simple for 5 year olds to grok. FP deals with for-loops on numbers, while sheet music deals with loops of higher-level concepts.

Expand full comment
pootietangus's avatar

Okay that's interesting because I always thought of imperative languages as modeling the way the CPU works, not the way programmers think. And I thought of FP as modeling the way programmers think, not the way the CPU works.

But you're saying FP is still very constrained? (Don't disagree, I'm just trying to understand how to break out of the box that exists in my mind)

Expand full comment
Paul Tarvydas's avatar

I like the words you used. Thanks. Yes, FP is very constrained. FP is, itself, an imperative language (“do this, then do that” vs something like Prolog’s “this is what I want in the end, make it so”). https://programmingsimplicity.substack.com/p/fp-programming-and-cpus?r=1egdky Please, if you have time, keep asking and poking at me. Thanks.

Expand full comment