3 ms·
I have a great appreciation for BASIC, being the first language I was exposed to both at home on my Atari 400 and in school on TRS-80 and Wang computers. Since
by karmakaze 3y ago
I have a great appreciation for BASIC, being the first language I was exposed to both at home on my Atari 400 and in school on TRS-80 and Wang computers. Since then I went through various machine/assembly languages, C, C++, Pascal, and modern procedural languages.
Lately I spend most of my time writing less-procedural code on procedural languages. Eliminating the step-by-step 'time' element and mutating variables is the best way I know to make more comprehensible software.
Just because computer hardware executes step-by-step in time, doesn't seem like a strong enough reason to learn programming this way. I'd really be curious what would happen if programming (not 'computers') were taught more transactionally with defined inputs, outputs, and a mapping definition that gets coded with intermediate expressions rather than time-varying data building. Basically, instead of starting with for/if/etc then eventually finding filter(predicate), map(function) start with them. There's a bit of learning curve up-front, but it seems flatter from there compared to all the accidental complexities created with the other approach. The first-class function aspects can even be bypassed by only using anonymous block syntax for a long time.
Is there a semi-popular introductory language that is more based on (or can use) immutable data and mapping expressions? Even for my own use, I can't really find much more approachable ones than Kotlin/Java/(Gleam?), F#/OCaml/Elm for statically typed ones. For dynamically typed languages, the close ones I can think of are Ruby and Elixir.