PDF4PRO ⚡AMP

Modern search engine that looking for books and documents around the web

Example: confidence

=Scala= - cheat sheets

= scala = cheat SHEET Every value is an object & every operation is a message send. PACKAGE Java style: package applies across the entire file scope Package "scoping" approach: curly brace delimitedpackage com { package mycompany { package scala { package demo { object HelloWorld { import // just to show nested importing def main(args : Array[String]) : Unit = { ("Hello there!") } } } } } } IMPORT import // imports all members of p // (this is analogous to import p.* in Java) import // the member x of p import p.{x => a} // the member x of p renamed // as a import p.{x, y} // the members x and y of p import // the member z of p2, // itself member of p1 import , // is a shorthand for import // ; import implicit imports: the package the package scala and the object Import anywhere inside the client scala file, not just at the top of the file, for scoped relevance, see example in Package var var_name: type = init_value; eg.

=Scala= CHEAT SHEET v.0.1 “Every value is an object & every operation is a message send.” PACKAGE Java style: package com.mycompany.mypkg applies across the entire file scope

Loading..

Tags:

  Scala

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Spam in document Broken preview Other abuse

Transcription of =Scala= - cheat sheets

Related search queries