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

Best of both worlds

Scala is a mixture of functional and object-oriented worlds. It gives two benefits. First, you can leverage the power of functional constructs: higher-order functions, nested functions, pure functions, and closures. You get to work with more available (and recommended) immutable data structures. Working with immutable code helps in eliminating code that can introduce side effects or state change. This also makes this language suitable for concurrent programming. This is just another advantage Scala provides. Second, you've all the object-oriented goodies available.

You can define traits, mix them in with classes or objects, and achieve inheritance. The creation of objects, defining abstracts, and sub-classing is also possible in Scala.

主站蜘蛛池模板: 清远市| 兴化市| 金山区| 西乡县| 长岭县| 聊城市| 济源市| 阳新县| 南雄市| 靖西县| 凭祥市| 济宁市| 北安市| 溧阳市| 沽源县| 漾濞| 西乌| 云南省| 新昌县| 耿马| 清涧县| 彭泽县| 邢台县| 贵德县| 靖江市| 苗栗县| 淳安县| 岳池县| 晋州市| 南雄市| 康马县| 汤阴县| 同德县| 虞城县| 南丹县| 剑阁县| 肃南| 于田县| 五原县| 凌源市| 海林市|