Predictions on Future CS1 Languages
A recent article in InfoWorld on up-and-coming languages got me thinking about the future of CS1 languages. They went on at some length about Python, which I think most people consider to be the up-and-coming CS1 language.
There seems to be two sorts of people who love Python: those who hate brackets, and scientists. The former helped create the language by building a version of Perl that is easier to read and not as chock-full of opening and closing brackets as a C descendant. Fast-forward several years, and the solution was good enough to be the first language available on Googles AppEngine — a clear indication Python has the kind of structure that makes it easy to scale in the cloud, one of the biggest challenges for enterprise-grade computing.Python’s popularity in scientific labs is a bit hard to explain, given that, unlike Stephen Wolframs Mathematica for mathematicians, the language never offered any data structures or elements explicitly tuned to meet the needs of scientists. Python creator Guido von Rossum believes Python caught on in the labs because “scientists often need to improvise when trying to interpret results, so they are drawn to dynamic languages which allow them to work very quickly and see results almost immediately.”
There have only really been three “CS1 languages,” the way that I’m using the term: Pascal, C++, and Java. All three programming languages were used in a large (over 50%) percentage of CS1 (intro CS for CS majors in post-secondary education in the US, and AP in high school) classes. All three were AP CS languages.
Pascal at one point was probably in over 80-90% CS1 courses. Not everyone jumped immediately to C++, but C++ was in the majority of CS1 classes. I know that because, when our Java MediaComp book came out, our publisher said that Java had just pulled even with C++ in terms of percent of the market — that means C++ had to have been in lots of classes. Java is the dominant language in CS1 classes today, but it’s declining. Python’s market share is rapidly growing, 40% per year the last three years. While it’s not clear that the new AP CS nor the AP CS Level A would ever adopt Python, Python might still gain the plurality of all CS1 languages. I doubt that any language will ever gain more than 30-40% of the CS1 market again — there are (and will be) too many options for CS1 languages, and too many entrenched interests. Faculty will stick with one, and may skip a plurality, e.g., I’ve talked to teachers at schools where they stuck with C++ but now are switching to Python.
I have two specific predictions to make about future CS1 languages, based on observations of the last three and the likely fourth.
- All future CS1 languages will be in common use in industry.
- No language will gain a plurality of CS1 courses unless it existed at the time of the last transition.
The transition from Pascal to C++ led to the greatest spike in AP CS Level A tests taken in Georgia. Until 2010, that was largest number of AP CS exams taken in Georgia. The transition from C++ to Java had nowhere near that kind of impact on the test numbers in Georgia. What might have led to so much more interest in the Pascal -> C++ transition? Pascal was a language that was not (perceived to be) common in industry, while C++ was. I don’t think that people perceived such a huge difference between C++ and Java. I believe that the sense that C++ was vocationally useful, was approved of by industry, had a huge positive impact on student interest in the test.
In this blog, we have often touched on the tension between vocational and academic interests in computer science classes. Vocational most often wins, especially in the majority schools. The elite schools might play with BYOB Scratch in their intro courses (but notice — even at Harvard and Berkeley, it’s for the non-majors, not for those who will major in CS), and community colleges might use Alice to ease the transition into programming, but the vast majority of schools in the middle value industry-approval too much to adopt a pedagogical language for their CS majors.
The implication of the first prediction is that, if Scratch or Alice are ever adopted for the new AP CS, only schools on the edges of the distribution will give CS major credit for it, because most schools will not adopt a CS1 language that isn’t useful for programming in industry. That isn’t necessarily a bad thing for the new AP CS — to succeed, schools must agree to give some credit for it, not necessarily CS major. Another implication is, if my prediction holds true, Scheme will never gain a plurality in CS1 courses.
The second implication is based on an observation of the timing of the four languages. Each existed as the previous was adopted for the AP CS Level A, which is a reasonable point at which to claim that the language had reached plurality. C++ existed (since 1983) when the AP CS Level A was started in Pascal (1988, I think). C++ was adopted in 2001, and Java came out in 1995. AP CS Level A shifted to Java in 2003, and Python 1.0 came out in 1989, with Python 2.0 (the one receiving the most interest) in 2000. It takes a lot of time to develop that industry use, and to build up the sense that the new language may be worth the pain in shifting.
The implication is that, whatever the next CS1 language will be (after Python), it exists today, as Python reaches plurality. Maybe Ruby, or Scala –more likely Ruby, given the greater industry penetration. Any language that we might invent for CS1 must wait for the next iteration. Scratch, Alice, and Kodu are unlikely to ever become CS1 languages, because it is unlikely that industry will adopt them. Few professional programmers will get their jobs due to their expertise in Scratch, Alice, or Kodu. That absolutely should not matter to CS1 instructors. But it does.