UCLA · CS131 · Programming Languages

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.

4 credit points Upper division undergrad Offered Winter 2026 ~44% exams Computer Science Department

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.

Spot the bug

Find what is wrong

Multiple choice · the fix is revealed after you answer

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
The fix

Under lazy evaluation, naturals_from builds elements only when demanded.

take(3, ...) demands three elements, so 0, 1 and 2 are produced and the rest is never evaluated.
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!

your whole grade
Where your grade comes from Coursework 56% · Exams 44%

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.

How it differs from its first-year siblings. Sixty-eight percent of the grade is two open-book exams, and the course's own objective is comparison: the questions ask you to argue why one language's design choice beats another's for a given problem. Homework in unfamiliar languages is the rehearsal, and a passing homework total is a hurdle.

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.

Difficulty
3.5 / 5
Moderately hard. Gentle early, demanding back half. Hard to fail with steady work; a top grade takes consistent practice.
Coursework
56%
Coursework carries most of the grade. The heaviest single component is the exam at 44%.
Weekly time
~12 hrs
Around 12 hours per week including class, across lectures, study and assessment.
Functional programming and grammarssteep
Types, object-oriented and logic programmingsteady
Semantics, run-time systems and language designsteep

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.
do this ↘
What top students do differently
  • 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.

1

T1 · Functional programming

FPL-Functional

Immutability, higher-order functions, recursion, pattern matching.

2

T2 · Syntax and grammars

FPL-Syntax, FPL-Translation

Grammars, parsing, syntax analysis.

High exam weightQuiz me on syntax →
3

T3 · Types and type systems

FPL-Types

Static and dynamic typing, polymorphism, type inference.

High exam weightQuiz me on types →
4

T4 · Object-oriented programming

FPL-OOP, FPL-Systems

Classes, inheritance, dispatch, memory models.

5

T5 · Logic programming

FPL-Logic

Unification, backtracking, declarative search.

6

T6 · Event-driven, reactive and parallel programming

FPL-Event-Driven, FPL-Parallel

Asynchrony, concurrency models.

7

T7 · Semantics and run-time systems

FPL-Semantics, FPL-Formalism, FPL-Run-Time

Operational and formal semantics, run-time behaviour, garbage collection.

High exam weightQuiz me on semantics →
8

T8 · Language pragmatics and design

FPL-Pragmatics, FPL-Design, FPL-Abstraction

Abstraction, representation, design principles.

How it's assessed

Assessment structure

ComponentWeightFormat & 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.
Homeworks (equally weighted; Project counts double)32%
Programming and written homeworks in several languages, equally weighted except the Project which counts double.
Midterm (open book and notes)24%
Open book and open notes, done individually.
Final exam (open book and notes)44%
Open book and open notes, done individually.
  • 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.
read this! If you read nothing else

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 lecture
Read the resources for the language or concept being introduced.
Lecture
Record each design trade-off with the language that exemplifies it.
Lab
Work the homework problems with the TA and learning assistants.
Weekend
Update your paradigm comparison table.

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

01

Memorising syntax. Exams test design reasoning, not language trivia.

02

Weak homework total. It is a hurdle independent of exam marks.

03

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.

Instructor

Paul Eggert

Student ratingNo student ratings yet
Teaching Assistant (Lab 1A)

Arteen Abrishami

Student ratingNo student ratings yet
Teaching Assistant (Lab 1B)

Saharsh Goenka

Student ratingNo student ratings yet
Teaching Assistant (Lab 1C)

Elizabeth Eyeson

Student ratingNo student ratings yet

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.

Why it matters beyond the grade. Reasoning about type systems, concurrency models and language trade-offs is what separates engineers who pick tools from engineers who evaluate them; the course is a structured version of that comparison.

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