Lecture

Functions and state

Description

This lecture introduces the concept of functions and state in programming. It starts by discussing the substitution model and how programs can be evaluated through rewriting. The importance of rewriting in functional programming is highlighted, showcasing how different rewritings can lead to the same solution. The lecture then delves into stateful objects, explaining how objects with state change over time and how mutable state is implemented using variables. Examples of state in objects, such as a bank account, are provided along with their corresponding implementations. The lecture concludes by exploring the relationship between statefulness, variables, and object-oriented programming.

About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.