FACTOID # 65: Per capita, South Africa has the most assaults, rapes, and murders with firearms.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Scala (programming language)

Scala is a multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. A programming language or computer language is a standardized communication technique for expressing instructions to a computer. ...

Contents


Scala is object-oriented

Scala is a pure object-oriented language in the sense that every value is an object. Types and behavior of objects are described by classes and traits. Class abstractions are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance. An object-oriented programming language is one that allows or encourages, to some degree, object-oriented programming methods. ... WordNet gives four main senses for the English noun object: a physical entity; something that is within the grasp of the senses; an aim, target or objective — see Object (task); a grammatical Object — either a direct object or an indirect object the focus of cognitions or feelings. ... Type has historically had the following uses: In biology, a type is the specimen or specimens upon which an original species description is based. ... Classes can refer to: social class scientific classification class (object-oriented programming) a subject in school see also class. ... In biology, a trait or character is a genetically inherited feature of an organism. ...


Scala is functional

Scala is also a functional language in the sense that every function is a value. Scala provides a lightweight syntax for defining anonymous functions, it supports higher-order functions, it allows functions to be nested, and supports currying. Scala's case classes and its built-in support for pattern matching model algebraic types used in many functional programming languages. Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions. ... Pattern matching is the act of checking for the presence of the constituents of a given pattern. ...


Furthermore, Scala's notion of pattern matching naturally extends to the processing of XML data with the help of regular expression patterns. In this context, sequence comprehensions are useful for formulating queries. These features make Scala ideal for developing applications like web services.


Scala is statically typed

Scala is equipped with an expressive type system that enforces statically that abstractions are used in a safe and coherent manner. In particular, the type system supports:

  • generic classes,
  • variance annotations,
  • upper and lower type bounds,
  • classes and abstract types as object members,
  • compound types,
  • explicitly typed self references,
  • views, and
  • polymorphic methods.

Classes can refer to: social class scientific classification class (object-oriented programming) a subject in school see also class. ...

Scala is extensible

The design of Scala acknowledges the fact that in practice, the development of domain-specific applications often requires domain-specific language extensions. Scala provides a unique combination of language mechanisms that make it easy to smoothly add new language constructs in form of libraries:

  • any method may be used as an infix or postfix operator, and
  • closures are constructed automatically depending on the expected type (target typing).

A joint use of both features facilitates the definition of new statements without extending the syntax and without using macro-like meta-programming facilities.


Scala interoperates with Java and .NET

Scala is designed to interoperate well with popular programming environments like the Java 2 Runtime Environment (JRE) and the .NET CLR. In particular, the interaction with mainstream object-oriented languages like Java and C# is as smooth as possible. Scala has the same compilation model (separate compilation, dynamic class loading) like Java and C# and allows access to thousands of high-quality libraries. The Java platform is the name for a computing environment, or platform, from Sun Microsystems which can run applications developed using the Java programming language and set of development tools. ... The . ... C (lowercase c) is the third letter of the Roman alphabet. ...


Hello World example

The Hello world program written in Scala: A hello world program is a computer program that prints out Hello, world! on a display device. ...

 object HelloWorld { def main(args: Array[String]) = { Console.println("Hello, world!"); } } 

External links

  • Scala website

  Results from FactBites:
 
Hello world program - Wikipedia, the free encyclopedia (611 words)
It is used in many introductory tutorials for teaching a programming language and many students use it as their first programming experience in a language.
A "hello world" program can be a useful sanity test to make sure that a language's compiler, development environment, and run-time environment are correctly installed.
While small test programs existed since the development of programmable computers, the tradition of using the phrase "Hello world!" as the test message was influenced by an example program in the book The C Programming Language, by Brian Kernighan and Dennis Ritchie, published in 1978.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.