CS131: nail every assessment, not just read the notes
Your complete guide to University of California, Los Angeles's programming languages course. See where the marks are, work real practice questions, and study with an AI tutor that knows CS131.
Sia generates CS131 practice questions, walks through functional programming and syntax step by step, and quizzes you on the material the heaviest assessments weight most heavily.
Find what is wrong
In a functional language with lazy evaluation, what does the call length(take(3, naturals())) return, where naturals() is an infinite list 0, 1, 2, ...?
let rec naturals_from n = n :: naturals_from (n + 1)
let naturals () = naturals_from 0
Under lazy evaluation, naturals_from builds elements only when demanded.
length of that three-element list is 3.
Under strict evaluation the same definition would loop forever: exactly the evaluation-order contrast the course asks you to explain.
The trap: Assuming an infinite definition cannot be used. Evaluation strategy, not the definition, decides termination. classic slip!
One exam decides 44% of your grade. No written make-ups. This whole page is built around that.
Overview
What CS131 is, and where it sits
CS 131 Programming Languages is UCLA's upper-division course on analysing and comparing programming languages and their implementations. The offering documented here is Winter 2026, taught by Paul Eggert with three lab-section teaching assistants and six learning assistants.
The course objective is to analyse and compare languages: abstraction, modularity, control mechanisms, types, declarations, syntax and semantics, across functional, object-oriented and logic paradigms, with attention to event-driven and parallel programming, language translation, run-time behaviour and language design. Homeworks are written in several languages, and the double-weighted Project is a larger piece of work.
The grade is 32% homeworks, 24% midterm and 44% final. Homeworks are weighted equally except the Project, which counts double, and you must earn a passing grade on the homeworks as a whole to pass the course. Both exams are open book and open notes.
Always treat your own course outline and the exam timetable as authoritative.
Difficulty & time commitment
Is CS131 hard, and how much time does it take?
CS131 is manageable if you keep a weekly rhythm and treat the back half as the main event. The pattern is consistent: it starts gently and steepens, and the heaviest assessment is the part that separates grades.
The difficulty curve and the assessment weighting point the same way: the back half is harder and worth more. Front-loading effort there is the highest-return decision in the course.
Is this course for you
Who tends to do well, and who tends to struggle
You will likely do well if
- You enjoy learning a new language quickly and comparing it with what you know.
- You are comfortable with recursion and symbolic reasoning from CS 32 and 33.
- You keep a running comparison table across paradigms for the open-book exams.
- You start the Project early; it counts double.
You may struggle if
- You expect one language for the whole quarter.
- You treat homework as optional; a passing homework total is a hurdle.
- You skip lectures because the exams are open book.
- You leave homework a few days late; the penalty triples daily.
- For every language covered, write its answer to the same five questions: typing, scoping, evaluation order, memory model, error handling.
- Trace unification and backtracking by hand on small logic programs.
- Write a tiny interpreter for a toy language during the quarter; it ties syntax, semantics and run-time together.
- Answer questions on the class Q&A site to sharpen the comparisons you will be asked for.
Syllabus
The 8 topics, unit by unit
The exam-weight marker on each topic shows where the marks concentrate. The amber topics carry the highest exam weight.
T1 · Functional programming
FPL-FunctionalImmutability, higher-order functions, recursion, pattern matching.
T2 · Syntax and grammars
FPL-Syntax, FPL-TranslationGrammars, parsing, syntax analysis.
T3 · Types and type systems
FPL-TypesStatic and dynamic typing, polymorphism, type inference.
T4 · Object-oriented programming
FPL-OOP, FPL-SystemsClasses, inheritance, dispatch, memory models.
T5 · Logic programming
FPL-LogicUnification, backtracking, declarative search.
T6 · Event-driven, reactive and parallel programming
FPL-Event-Driven, FPL-ParallelAsynchrony, concurrency models.
T7 · Semantics and run-time systems
FPL-Semantics, FPL-Formalism, FPL-Run-TimeOperational and formal semantics, run-time behaviour, garbage collection.
T8 · Language pragmatics and design
FPL-Pragmatics, FPL-Design, FPL-AbstractionAbstraction, representation, design principles.
How it's assessed
Assessment structure
| Component | Weight | Format & timing |
|---|---|---|
| Homeworks (equally weighted; Project counts double) | 32% | Programming and written homeworks in several languages, equally weighted except the Project which counts double. Through the quarter. 3^N% penalty for N full days late; must pass the homeworks as a whole. |
| Midterm (open book and notes) | 24% | Open book and open notes, done individually. Mid-quarter. No written make-ups. |
| Final exam (open book and notes) | 44% | Open book and open notes, done individually. Registrar's finals slot. No written make-ups. |
- The three components sum to 100. You must earn a passing grade on the homeworks as a whole to pass the course. Homework loses 3^N% for N full days late and is not accepted after the last day of instruction. No written make-up exams.
- A mid-quarter midterm (24%) and a final (44%) at the registrar's slot, both open book and open notes and done individually. Expect comparison and design questions across the paradigms covered.
This is a coursework course. Coursework carries 56% of the grade and the final exam (open book and notes) is the single heaviest piece at 44%, so steady work across the semester decides your result more than any one sitting. No written make-ups.
Final exam timing: During the examination period. Confirm the exact date and venue on your exam timetable.
How to actually pass it
A weekly rhythm, two checklists, and the traps to avoid
The course rewards consistency over cramming, and practice over re-reading. Here is the loop that works, then what to have nailed before each exam.
The weekly loop
Before the mid-semester checklist
- Write higher-order functional code with pattern matching.
- Read and write a grammar and explain ambiguity.
- Explain static versus dynamic typing and type inference.
- Contrast dispatch and memory models across OO languages.
Before the final heaviest topics
- Trace a logic program's unification and backtracking.
- Explain an event-driven or parallel model and its hazards.
- Give an operational semantics for a small language fragment.
- Argue a language-design choice for a stated problem.
The mistakes that cost marks
Memorising syntax. Exams test design reasoning, not language trivia.
Weak homework total. It is a hurdle independent of exam marks.
Late Project. Double weight means double loss.
Teaching team
Who teaches CS131
The bios below are factual. We do not rate lecturers; any star ratings are submitted by students who have taken CS131.
Teaching team as listed in the course materials reviewed. AskSia does not rate lecturers; star ratings are submitted by students who have taken CS131.
Formula & concept sheet
The vocabulary and formulas you must own
- Higher-order function
- A function that takes or returns functions.
- Pattern matching
- Destructuring data by shape in a function definition.
- Context-free grammar
- Rules generating the syntax of a language.
- Type inference
- Deducing types without annotations.
- Dynamic dispatch
- Selecting a method at run time by object type.
- Unification
- Finding a substitution that makes two terms equal.
- Backtracking
- Undoing choices to explore alternatives in search.
- Operational semantics
- Meaning defined by how expressions evaluate step by step.
- Garbage collection
- Automatic reclamation of unreachable memory.
Set texts
The prescribed reading
The syllabus references map straight onto these.
Programming language resources page
.
Where it fits
Prerequisites, related courses & why it matters
Prerequisites: CS 32, 33 and 35L. 4 units; lecture 4 hours, laboratory 2 hours, outside study 6 hours per week.
Your CS131 study toolkit
Study the course with Sia, not just read about it
Each tool already knows CS131: your syllabus, your texts, and where the marks are. Grouped by how you study, from first contact to exam week.
FAQ
Frequently asked questions
Is CS 131 hard?
Moderately hard on the six-factor rubric: 68% in two open-book exams, a homework hurdle and programming in several unfamiliar languages.
What is the assessment breakdown?
Homeworks 32% (Project double-weighted), midterm 24%, final 44%, per the Winter 2026 grading page.
Who teaches it?
Paul Eggert in Winter 2026, with lab teaching assistants Arteen Abrishami, Saharsh Goenka and Elizabeth Eyeson.
Is there a textbook?
No required text; the course site maintains a programming-language resources page.
Can I pass on exams alone?
No. A passing grade on the homeworks as a whole is required to pass the course.
What is the late policy?
3 to the power N percent for N full days late; nothing is accepted after the last day of instruction.
Study CS131 with Sia
Work through functional programming, syntax, types and the rest of the course with a tutor that knows it and quizzes you on the topics the assessments weight most heavily.
Start studying with Sia