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

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
主站蜘蛛池模板: 搜索| 崇明县| 大悟县| 隆回县| 桃园市| 丹阳市| 洛川县| 鄂托克前旗| 南雄市| 垣曲县| 烟台市| 夏河县| 宝山区| 万盛区| 白城市| 高密市| 远安县| 黔西县| 晋州市| 屯门区| 西宁市| 浪卡子县| 体育| 南涧| 图们市| 安乡县| 红安县| 长丰县| 尉氏县| 嘉祥县| 娄烦县| 永宁县| 西盟| 临武县| 静海县| 冕宁县| 逊克县| 庆阳市| 连州市| 岳阳市| 闻喜县|