In the 1981 I cracked open my first real book on computer programming: Apple II User’s Guide by Lon Poole with Martin McNiff and Steven Cook. I still have it sitting in my bookshelf 36 years later. Previous to the Apple II User’s Guide I was playing around programming by typing-in code from hobbyist magazines. But now I felt ready to write an original program. I had no education in Computer Science and I didn’t even own an Apple II computer. But armed with the information in the Apple II User’s Guide I knew I was going create an awesome program of my own imagination!
I read the Apple II User’s Guide from cover to cover. I highlighted passages on almost every page. It didn't help. I learned a lot about the specifics of programming an Apple II but I never did write that original program for the Apple II.
1980's BASIC was horribly hard 😱
BASIC in the 1980s was a much simpler but unforgiving language than the programming languages of today. Features programmers take for granted, like objects, classes, protocols, constants, and named functions, didn’t exist. The core features BASIC did have back then were ints or floats (but not both), strings, arrays, conditionals, loops, simple IO, and the ability to jump to any line in code by it’s number.
None of our modern tooling was available on an Apple II. Instead of an integrated development environment you had modes: immediate, editing, and running. Basic programs were written with line numbers and the line numbers were referred to in the body of the code! In the end writing and debugging BASIC code was tough. As the Apple II User’s Guide noted on page 51, “The simplest way to change a program line is to retype it.”
Looking back on it, without modern programming languages and modern tools and most importantly without the web, YouTube, and Stack Overflow, I honestly don’t know how I learned to write a real program. (But I did and how I did is a story for another time.)
Brain stack overflow 🤢
Apple started a few years back with its surprise introduction of Swift. After decades of pushing Objective-C and it’s highly idiosyncratic syntax as the way to build macOS and iOS apps, Apple decided to abandon billions of lines of code for a wholly new language that was pretty, slow, and immature. Swift sprung into existence unasked for and unneeded.
Except something better than Objective-C was needed. The bar for programming Objective-C is very high. And Objective-C is only used in the Apple universe. So it was not only hard to learn how to code iOS apps and it was equally hard to find programmers to code iOS apps.
- Brevity: Don’t make me type!
- No boilerplate: Don’t make me repeat myself!
- Immutability by default and static typing: Help me not make stupid mistakes!
- Declarative syntax: Let me make objects and data structures in a single line of code!
- Multiple programming styles including object-oriented and functional: One paradigm doesn’t fit all programming problems.
- Fast compile and execution: Time is the one resource we can’t renew so let’s not waste it!
- The ability share code betwixt and between the frontend and the backend: Because we live in a semi-connected world!
- Really smart IDE integration: The editor and the compiler should point me to the correct syntax and help me navigate the documentation interactively.
There you have it. Accidentally, in a random and evolutionary way, the world of programming languages and tools is getting better and more interoperable, without anyone in charge. I love when that happens.