Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
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.