O'Reilly logo

Swift 3 Functional Programming by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Types and Type casting

This chapter starts with explaining types, touching on the concept of type in the category theory very briefly. Then, it explains value and reference types and compares them in detail. Finally, it talks about equality, identity, and type casting.

This chapter will cover the following topics with coding examples:

  • Types
  • Value versus reference types
    • Value and reference type constants
    • Mixing value and reference types
    • Copying
    • Value type characteristics
  • Equality, identity, and comparing
  • Type checking and casting

You may have heard that functional programming uses concepts of the category theory. This link is the reason why some people find functional programming closer to mathematics. In an upcoming chapter, we will talk briefly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required