Abstract
In Chapter 3, you saw some of the simple but powerful data types and language constructs that make up F# functional programming. The functional programming paradigm is strongly associated with “programming without side effects,” called pure functional programming. In this paradigm, programs compute the result of a mathematical expression and don’t cause any side effects, except perhaps reporting the result of the computation. The formulas used in spreadsheets are often pure, as is the core of functional programming languages such as Haskell. F# isn’t, however, a pure functional language. For example, you can write programs that mutate data, perform I/O communications, start threads, and raise exceptions. Furthermore, the F# type system doesn’t enforce a strict distinction between expressions that perform these actions and expressions that don’t.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Editor information
Rights and permissions
Copyright information
© 2010 Don Syme, Adam Granicz, and Antonio Cisternino
About this chapter
Cite this chapter
Syme, D., Granicz, A., Cisternino, A. (2010). Introducing Imperative Programming. In: Andres, C., et al. Expert F# 2.0. Apress. https://doi.org/10.1007/978-1-4302-2432-7_4
Download citation
DOI: https://doi.org/10.1007/978-1-4302-2432-7_4
Publisher Name: Apress
Print ISBN: 978-1-4302-2431-0
Online ISBN: 978-1-4302-2432-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)