官术网_书友最值得收藏!

Building Blocks of Scala

"You can't build a great building on a weak foundation. You must have a solid foundation if you're going to have a strong superstructure."
- Gordon B. Hinckley

Our aim as programmers is to provide a solution to a problem through some logical implementation. Programming languages work as a tool for just that. When we implement a solution to a problem, we must be able to describe the problem (specification) so that a programming language can verify (verification) whether the solution indeed solves the problem.

Problem Solution

For implementation, we use various programming constructs, which are basic entities with some syntactic rules. These entities work as building blocks for any programming language. In Scala, we have similar syntax to almost any other programming language. We use keyword/name/classifier/bound-entity. In this chapter, our aim is to get familiar with some of the building blocks. We'll go through:

  • The val and var keywords
  • Literals
  • Data types
  • Type Inference
  • Operators
  • Wrapper classes
  • String interpolation
主站蜘蛛池模板: 景宁| 青川县| 宣汉县| 建湖县| 兴宁市| 武功县| 白朗县| 万载县| 北川| 宜昌市| 曲沃县| 叶城县| 西华县| 商河县| 黄大仙区| 福泉市| 将乐县| 阿坝县| 祁连县| 滨海县| 封丘县| 盐山县| 温泉县| 涿州市| 凌源市| 昭觉县| 白朗县| 新和县| 江都市| 涟水县| 武乡县| 台安县| 丹东市| 昭苏县| 桂林市| 乌鲁木齐县| 繁昌县| 临猗县| 咸阳市| 肇庆市| 合肥市|