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

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
主站蜘蛛池模板: 柘城县| 拜泉县| 大冶市| 武强县| 高雄县| 广州市| 澜沧| 苍溪县| 庆元县| 囊谦县| 莱西市| 靖边县| 株洲县| 元氏县| 建宁县| 盐边县| 渭源县| 沈阳市| 武冈市| 通江县| 册亨县| 渭南市| 霍城县| 平定县| 锦州市| 赤城县| 新化县| 封丘县| 商丘市| 清流县| 梅河口市| 闵行区| 长治县| 栾城县| 恭城| 青阳县| 蛟河市| 平顺县| 昆明市| 平邑县| 当阳市|