School / Prep
ENSEIRB-MATMECA
Internal code
EI6PG104
Description
This course presents programming in a different light to the S5 courses. The programming style presented in the first semester is 'imperative'; this course presents the 'functional' programming style. The study of this style allows us to explore a new family of programming techniques, as well as to consider the software qualities that distinguish these different styles. The use of the Javascript programming language highlights these contrasts.Course outline:
Presentation of programming styles / paradigms. Comparison of imperative and functional styles. Introduction to purity, modularity and 1st class. A brief history of programming languages.
Presentation of the Ecmascript language (syntax, node environment)Notion of scope and closure.
Purity and Modularity. Notion of edge effects, purity, referential transparency. Programming without edge effects. Use of recursion and terminal recursion.
Functional data structures: linked lists, trees. Notion of persistence. Higher-order operators on these data structures.
1st class citizenship. Higher-order functions. Techniques: generalization, specialization. Examples of using functions in data structures. Examples of functional programming interfaces (pipeline, map-reduce, fluent interfaces)
Programming techniquesTyped programming (polymorphism), "function-directed" programming, evaluation controlEvaluation strategies.
Modularity. Review of the concepts of abstraction, encapsulation, interface, specification and dependency.
Teaching hours
- CMLectures16h
- TDTutorial20h
- TIIndividual work10h
Syllabus
Introduction to programming styles / paradigms. Comparison of imperative and functional styles. Introduction to purity, modularity and 1st class. A brief history of programming languages.
Presentation of the Ecmascript language (syntax, node environment)Notion of scope and closure.
Purity and Modularity. Notion of edge effects, purity, referential transparency. Programming without edge effects. Use of recursion and terminal recursion.
Functional data structures: linked lists, trees. Notion of persistence. Higher-order operators on these data structures.
1st class citizenship. Higher-order functions. Techniques: generalization, specialization. Examples of using functions in data structures. Examples of functional programming interfaces (pipeline, map-reduce, fluent interfaces)
Programming techniquesTyped programming (polymorphism), "function-directed" programming, evaluation controlEvaluation strategies.
Modularity. Review of the concepts of abstraction, encapsulation, interface, specification and dependency.
Further information
This course presents programming in a different light to the S5 courses. The programming style presented in the first semester is 'imperative'; this course presents the 'functional' programming style. The study of this style allows us to explore a new family of programming techniques, as well as to consider the software qualities that distinguish these different styles. The use of the Javascript programming language highlights these contrasts.
Assessment of knowledge
Initial assessment / Main session - Tests
Type of assessment | Type of test | Duration (in minutes) | Number of tests | Test coefficient | Eliminatory mark in the test | Remarks |
---|---|---|---|---|---|---|
Final inspection | Machine work | 120 | 1 | without document without calculator |
Second chance / Catch-up session - Tests
Type of assessment | Type of test | Duration (in minutes) | Number of tests | Test coefficient | Eliminatory mark in the test | Remarks |
---|---|---|---|---|---|---|
Final test | Machine work | 120 | 1 | without document without calculator |