Case Study 2: Why Schools Are Returning to Pascal
A composite case study of a CS department that switched from Python to Pascal for introductory programming — and saw measurable improvements in student outcomes.
⚠️ Note on Sources This case study is a Tier 3 composite. "Westfield University" is a fictional institution, and its faculty members are fictional characters. However, the problems described (high CS1 failure rates, weak CS2 performance after Python-based CS1, the "library dependence" phenomenon) are well-documented in computer science education literature. The data tables present illustrative figures based on published trends. All quotes are constructed for pedagogical purposes.
The Problem
In 2019, the Computer Science department at Westfield University — a midsized public university with approximately 800 CS majors — faced a crisis. Their introductory programming course (CS 110: Introduction to Programming, taught in Python) had a 38% D/F/Withdrawal (DFW) rate. This was roughly in line with the national average for CS1 courses, but "in line with the national average" is cold comfort when it means that four out of every ten students who attempt your course either fail or drop out.
More troubling than the CS1 failure rate was what happened afterward. Students who passed CS 110 with Python were struggling badly in CS 210: Data Structures, taught in Java. Dr. Evelyn Torres, the department chair, commissioned an internal review. The findings were stark:
- 62% of CS 210 students could not correctly trace through a linked list insertion when given pseudocode on a midterm exam.
- 47% of students reported that they had "never thought about" what type a variable held before encountering Java's type system.
- The most common CS 210 complaint was "I don't understand why Java makes me declare types when Python didn't need them."
- Students relied heavily on library functions they could not explain. When asked to implement a sorting algorithm, 34% of students attempted to call Python's
sorted()function — in a Java course.
"Our students were learning to use Python," Dr. Torres observed. "They were not learning to program. They could call pandas.read_csv() but could not explain what a file was. They could use list comprehensions but could not implement a loop correctly in any language that required explicit syntax."
The department's CS 210 instructor, Dr. Marcus Kim, was blunter: "We were producing students who could drive automatics but could not operate a stick shift. The first time they had to think about what was happening under the hood, they stalled."
The Debate
In the fall of 2019, Dr. Torres proposed switching CS 110 from Python to Pascal, using Free Pascal as the compiler and a structured curriculum that emphasized types, compilation, and algorithm design. The proposal ignited a fierce departmental debate.
Arguments Against the Switch
Dr. Sarah Okonkwo (Software Engineering): "Our students need Python for internships and jobs. If we switch to Pascal, we're putting them at a competitive disadvantage in the job market. Nobody lists Pascal on job postings."
Dr. James Liu (Machine Learning): "Python is the language of data science and AI. Students who don't learn Python early will struggle to participate in research. We can't pretend the industry doesn't exist."
Several students (via petition): "We chose CS because we wanted to build apps and websites, not learn a language our parents used. Pascal feels like going backwards."
Arguments For the Switch
Dr. Marcus Kim (Data Structures): "I don't care what language CS 110 uses, as long as students arrive in my course understanding types, memory, and program structure. Right now, they don't. If Pascal fixes that, I'm for it."
Dr. Torres (Department Chair): "The purpose of CS 110 is not to prepare students for their first internship. It is to prepare them for the other 35 courses in our major. A student who understands types, compilation, and structured programming will learn Python in a week. A student who only knows Python may never understand types."
Dr. Amara Osei (Theory of Computation): "I see the downstream effects in my courses. Students who learned Python first have weak formal reasoning skills. They think in terms of 'what library does this' rather than 'what algorithm solves this.' That is a fundamental failure of CS 110."
The Compromise
The department voted to run a two-year pilot: two sections of CS 110 in Pascal and two sections in Python, running simultaneously with the same syllabus topics, the same assignments (translated for each language), and the same exams (language-independent, testing concepts rather than syntax). Students were randomly assigned to sections at registration. Dr. Torres would track outcomes through CS 210 and CS 310 (Algorithms).
The Pilot (2020–2022)
Course Design: CS 110 in Pascal
The Pascal sections used Free Pascal 3.2 with a simple text editor (not Lazarus — the visual IDE was reserved for an upper-division elective). The curriculum followed a structured progression:
| Week | Topic | Pascal Focus |
|---|---|---|
| 1–2 | What is programming? Variables and types | var, Integer, Real, String, Boolean, strong typing |
| 3–4 | Input/Output, arithmetic, expressions | ReadLn, WriteLn, := vs =, operator precedence |
| 5–6 | Selection (if-then-else, case) | if-then-else, case-of, Boolean logic |
| 7–8 | Iteration (loops) | for, while, repeat-until, loop design |
| 9–10 | Procedures and functions | procedure, function, parameters (value vs var), scope |
| 11–12 | Arrays and records | array, record, structured data |
| 13–14 | File I/O | TextFile, Assign, Reset, Rewrite, Append |
| 15 | Review and final project | A complete program integrating all concepts |
Key Pedagogical Differences
The Pascal sections differed from the Python sections in several important ways:
-
Compilation before execution. Every session began with students compiling their code and reading compiler error messages. By week three, students could interpret most common errors without assistance. In the Python sections, students first encountered error messages at runtime, often after writing many lines of code, making errors harder to localize.
-
Type declarations from day one. Pascal students declared
var count: Integer;in their first program. By week two, they could explain the difference betweenInteger,Real,String, andBooleanand predict what would happen if they tried to assign the wrong type. Python students encountered types only when something went wrong. -
No libraries for the first ten weeks. Pascal students implemented everything from scratch: their own string processing, their own array searching, their own sorting. Python students, despite being told not to, frequently used built-in functions (
len(),sorted(),str.split()) that obscured the underlying algorithms. -
Explicit program structure. Every Pascal program had a clear structure:
programname,varsection,begin/endblock. Students learned to plan their programs before writing them. Python's lack of structure let students "code by wandering" — adding lines until something worked.
The Results
CS 110 Outcomes (DFW Rates)
| Metric | Python Sections | Pascal Sections |
|---|---|---|
| Enrollment | 312 students | 298 students |
| DFW rate | 36.2% | 28.5% |
| Average final exam score | 71.3% | 76.8% |
| "I understand what a type is" (exit survey) | 54% agree | 89% agree |
| "I can trace through code on paper" (exit survey) | 41% agree | 73% agree |
| "I understand what the compiler does" (exit survey) | 22% agree | 81% agree |
The Pascal sections had a meaningfully lower DFW rate (28.5% vs 36.2%) and higher final exam scores (76.8% vs 71.3%), despite teaching the same concepts. Exit survey data revealed even larger differences in self-reported understanding of foundational concepts.
💡 Intuition: Why Did the DFW Rate Drop? The Pascal students did not find programming easier. In fact, many reported that the first few weeks were harder than they expected. But Pascal's immediate feedback — compiler errors caught before runtime — meant that students who were struggling got clear signals early, when they could still seek help. Python students often believed they understood the material (because their code ran without errors) until the exam revealed gaps. Early, honest feedback is more effective than late surprises.
CS 210 Outcomes (Data Structures, Java)
The critical test was downstream: how did Pascal-trained students perform in CS 210 compared to Python-trained students?
| Metric | Python → CS 210 | Pascal → CS 210 |
|---|---|---|
| Students entering CS 210 | 187 | 196 |
| DFW rate in CS 210 | 29.4% | 18.9% |
| Midterm 1 average (types, arrays, linked lists) | 64.7% | 78.2% |
| Midterm 2 average (trees, sorting, hashing) | 69.1% | 74.6% |
| "Can implement a linked list from scratch" (practical exam) | 44% pass | 71% pass |
| "Can trace through a recursive function on paper" (exam) | 51% correct | 74% correct |
| Average time to complete first Java assignment | 8.3 hours | 5.1 hours |
The results were striking. Pascal-trained students had a dramatically lower DFW rate in CS 210 (18.9% vs 29.4%) and performed better on every assessment. The practical exam results were especially telling: 71% of Pascal-trained students could implement a linked list from scratch versus 44% of Python-trained students.
Perhaps most surprising was the Java adaptation time. Despite having never seen Java before, Pascal-trained students completed their first Java assignment faster than Python-trained students. The Pascal students' understanding of types, compilation, and explicit structure transferred directly to Java.
📊 Real-World Application: Transfer of Learning The concept of "transfer" — the ability to apply skills learned in one context to a new context — is central to education theory. The Westfield data illustrate positive transfer: skills learned in Pascal (type awareness, compilation mental model, explicit structure) transferred effectively to Java. The weaker transfer from Python to Java illustrates the cost of learning in a permissive environment — the skills that were never forced were never formed.
Qualitative Feedback
Dr. Kim, the CS 210 instructor, noticed differences immediately:
"The Pascal students asked different questions. Instead of 'Why do I have to declare a type?' they asked 'Is Java's int the same as Pascal's Integer?' They already had a mental model for types — they just needed to translate it. The Python students were encountering the concept of types for the first time in week two of a data structures course. That's too late."
Student feedback was mixed but revealing:
-
A Pascal student: "I hated Pascal for the first three weeks. The compiler yelled at me constantly. But by week six, I realized I was actually understanding what my code did, not just hoping it would work. When I tried Python over the summer, it felt like someone had removed all the safety rails."
-
A Python student who later took CS 210: "I wish someone had told me that types mattered. I spent my entire CS 110 just calling functions and making things 'work.' Then CS 210 hit me like a wall."
-
A Pascal student on the job market concern: "I was worried that Pascal wouldn't help me get internships. Then I did a coding interview in Python and solved the problem in ten minutes because I understood the algorithm. My friend who took Python CS 110 couldn't solve it because he kept trying to find a library function that did it."
The Decision
In the spring of 2022, after reviewing two years of data, the Westfield CS department voted 11–4 to adopt Pascal as the permanent language for CS 110, effective fall 2022. The motion included several provisions:
-
Python as CS 120. A new course, CS 120: Programming in Python, would be offered as a second-semester course that built on the foundations established in Pascal. Students would learn Python quickly (because they already understood the underlying concepts) and be introduced to Python's ecosystem (NumPy, matplotlib, pandas) in the context of data science applications.
-
Lazarus elective. A new upper-division elective, CS 340: Cross-Platform Development with Lazarus, would be offered for students interested in GUI application development with Pascal.
-
Assessment commitment. The department would continue tracking outcomes through CS 210, CS 310, and senior capstone projects to ensure the improvement was sustained.
-
Instructor training. Two summer workshops would be offered for instructors transitioning from Python to Pascal.
Analysis: Why It Worked
The Westfield pilot's success was not magic. It can be explained by well-established principles of learning science:
1. Desirable Difficulty
The learning science literature shows that making learning moderately harder in the short term produces better long-term retention and transfer. Pascal's requirement to declare types, plan program structure, and fix compiler errors before running code introduced "desirable difficulty" — struggle that built understanding. Python's permissiveness eliminated this struggle, producing the illusion of learning without the substance.
2. Immediate, Specific Feedback
Pascal's compiler provides immediate, specific feedback: "Error: Incompatible types: got String, expected Integer, line 14." This is far more useful for learning than Python's runtime errors, which may not appear until a specific code path is executed and may manifest as confusing behavior rather than clear error messages.
3. Forced Confrontation with Concepts
Pascal forces students to confront types, scope, parameter passing, and program structure because the language requires it. Python allows students to avoid these concepts, and most beginners will avoid anything that is not required. The students who are most likely to skip difficult concepts are precisely the students who most need to learn them.
4. Transferable Mental Models
Students who learn Pascal develop explicit mental models for types ("every variable has a specific type, declared in advance"), compilation ("the compiler translates my source code to machine instructions and checks for errors"), and program structure ("a program has declared data, declared procedures, and a main block"). These models transfer to any typed, compiled language. Students who learn Python develop weaker models because Python does not require them to be explicit.
Limitations and Counterarguments
Intellectual honesty requires us to acknowledge what this case study does not prove:
- This is a single institution. Results at Westfield may not generalize to all universities, especially those with different student populations, different CS 210 curricula, or different instructors.
- The Hawthorne effect is possible. Faculty enthusiasm for the new curriculum may have improved teaching quality independently of the language choice.
- Self-selection bias. Although students were randomly assigned, it is possible that students who ended up in the Pascal sections differed in motivation or ability in ways that were not captured.
- Python can be taught well. The comparison is not "Pascal vs. the best possible Python course" — it is "Pascal vs. a typical Python course." A Python course that rigidly enforced type annotations, avoided library use, and required explicit structure might produce results closer to Pascal's.
- Job market concerns are real. Students who learn Pascal first do need to learn an industry language (Python, Java, JavaScript, C++) before entering the job market. The Westfield data suggest they learn it faster, but the additional course (CS 120) represents a real cost in curriculum hours.
Discussion Questions
-
The Westfield data show that Pascal-trained students completed their first Java assignment faster than Python-trained students, despite never having seen Java before. What does this suggest about the nature of "transferable programming skills"? Are there specific skills you would expect to transfer, and specific skills that would not?
-
Dr. Okonkwo argued that students need Python for internships and jobs. Dr. Torres argued that CS 110's purpose is to prepare students for the rest of the major, not for internships. Who do you think is right? Is it possible to satisfy both goals?
-
The case study notes that "Python can be taught well" — that a rigorous Python course with enforced type annotations might produce similar results to Pascal. If this is true, why would switching to Pascal be preferable to simply teaching Python more rigorously?
-
One student reported hating Pascal for the first three weeks but appreciating it by week six. This matches the learning science concept of "desirable difficulty." Can you think of other domains where initial difficulty leads to better long-term outcomes? How might an instructor help students push through the difficult initial period?
-
If you were a student choosing between the Python section and the Pascal section of CS 110, which would you choose? Why? Has reading this case study changed your answer from what it would have been before?