- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 131字
- 2021-07-02 23:54:35
Types and Type Casting
In the previous chapter, we talked about functions and closures and covered topics such as function types. We know that functions are first-class citizens in Swift and they can be stored and passed around like any type. It is the time to look into types in detail.
This chapter starts with explaining types, touching on the concept of types 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
- Different categories of 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
推薦閱讀
- 數(shù)據(jù)要素安全流通
- Python數(shù)據(jù)挖掘:入門、進階與實用案例分析
- Access 2016數(shù)據(jù)庫技術(shù)及應(yīng)用
- R數(shù)據(jù)科學(xué)實戰(zhàn):工具詳解與案例分析(鮮讀版)
- Learn Unity ML-Agents:Fundamentals of Unity Machine Learning
- Python數(shù)據(jù)分析:基于Plotly的動態(tài)可視化繪圖
- 智能數(shù)據(jù)時代:企業(yè)大數(shù)據(jù)戰(zhàn)略與實戰(zhàn)
- 基于OPAC日志的高校圖書館用戶信息需求與檢索行為研究
- Python數(shù)據(jù)分析與數(shù)據(jù)化運營
- HikariCP連接池實戰(zhàn)
- Oracle 11g+ASP.NET數(shù)據(jù)庫系統(tǒng)開發(fā)案例教程
- 商業(yè)智能工具應(yīng)用與數(shù)據(jù)可視化
- 數(shù)據(jù)中心經(jīng)營之道
- SOLIDWORKS 2018中文版機械設(shè)計基礎(chǔ)與實例教程
- Trino權(quán)威指南(原書第2版)