Scala Learning

Source: Internet
Author: User
1. Scala Learning

Official website;

Http://www.scala-lang.org/

Http://www.scala-lang.org/download/


A scalable language is a multi-paradigm programming language, similar to java, designed to integrate various features of object-oriented programming and functional programming.
Scala runs on JVM.
Scala has several key features that demonstrate its object-oriented nature. For example, each value in Scala is an object, including the basic data type (Boolean value, number, etc.), and a function is also an object. In addition, classes can be subverted, and Scala also provides mixin-based composition ).
Compared with languages that only support single inheritance, Scala has more extensive class reuse. Scala allows you to reuse the newly added member definitions in a class when defining a new class (that is, differences from its parent class )". Scala is called a mixin class combination.
Scala also contains several key concepts of functional languages, including high-Order functions, Currying, and Nested functions) and Sequence Comprehensions.
Scala is static, which allows it to provide generic, internal, and even polymorphism methods ). It is also worth mentioning that Scala is specially designed to be able to interoperate with Java and. NET. Scala's current version cannot run on. NET (although the previous version can be-_-B), it can run on. NET in the future as planned.
Scala can interoperate with Java. It uses the scalac compiler to compile the source file into a Java class file (that is, the bytecode that runs on the JVM ). You can call all Java class libraries from Scala, or call Scala code from Java applications. In the words of David Rupp,
It can also access an endless number of existing Java class libraries, which makes it easier (potentially) to migrate to Scala.
This allows Scala to use a huge number of Java class libraries and frameworks written for Java1.4, 5.0, or 6.0. Scala will regularly test these versions of Java. Scala may also run on earlier Java versions, but it has not been formally tested. Scala was released with the BSD license and was considered quite stable several years ago.


2. Build the environment


Environment Variable Value (example)
Unix
$ SCALA_HOME $ PATH
/Usr/local/share/scala $ PATH: $ SCALA_HOME/bin
Windows
% SCALA_HOME % PATH %
C: \ Progra ~ 1 \ Scala % PATH %; % SCALA_HOME % \ bin

After decompression, set the path.

Enter scala to enter the command line mode.

Print ("hello world! ")

You can use it.

3. Learning documents

Object HelloWorld {def main (args: Array [String]) {println ("Hello, world! ")}}

Hello world.

Http://c.open.163.com/coursera/courseIntro.htm? Cid = 116 #/courseIntro



Scala Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.