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

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
主站蜘蛛池模板: 高平市| 铁岭市| 龙游县| 余姚市| 吴堡县| 延寿县| 五河县| 珲春市| 三亚市| 湛江市| 明光市| 蓬莱市| 金川县| 手游| 满城县| 辽中县| 台湾省| 资源县| 内乡县| 松原市| 天祝| 稻城县| 梓潼县| 天祝| 丰都县| 西贡区| 从江县| 镇赉县| 三亚市| 盖州市| 马尔康县| 靖江市| 宜良县| 鲜城| 彭州市| 延长县| 营口市| 洛阳市| 洛扎县| 新营市| 聂荣县|