I know very little about the Scala programming language. This document will go over all of my knowledge of the Scala programming language.
This is how you make a normal Hello World program in Scala:
@main def main() = {
println("Hello, World!")
}
It is similar to Java.
A more simple version of the Hello World program for Scala can be writtern with just 1 line:
println("Hello World")
Comments in Scala are the same as in languages like Java, C, C++, etc.
Single line comments in Scala are written like so:
// This is a single line comment in Scala
Multi-line comments in Scala look like this:
/* This is
* a multi-
* line
* comment */
Scala does not support the break
keyword.
Classes in Scala are simplified version of Java classes known as singletons
of which they only contain 1 type (and not multiple, like in Java: static
, void
, public
etc.)
class scalaClass(
println("Scala class")
)
/!\ This example has not been tested yet, and may not work
Functions in Scala are simple and straightforward. They are defined like so:
def printFunction {
println("The print function has been printed")
}
/!\ This example has not been tested yet, and may not work
-
Scala is a language by Martin Odersky
-
Scala is not a semicolon and curly bracket language, but it is a semicolon language
-
Scala uses the
*.scala
file extension by default, and also uses the*.sc
file extension. I don't know if it uses any other file extensions. -
Scala is designed to remove the problems with Java
-
Scala is said to have a learning curve, and has been removed from several companies usage, such as Twitter and Yammer
-
Scala was created in 2004
-
Scala is one of the top 50 programming languages (as of 2022, July 31st, it ranks #34) source: TIOBE index
-
Scala is a language recognized by GitHub (as of 2022, Tuesday, August 2nd)
-
Scala recognizes everything as an expression
-
Scala is very similar to Java
-
No other knowledge of the Scala programming language
-
I have not yet memorized the names of the developer
-
No other additional comments available
File type: Markdown document (*.md *.mkd *.mdown *.markdown)
File version: 1 (2022, Tuesday, August 2nd at 8:30 pm PST)
Line count (including blank lines and compiler line): 172
Click/tap here to expand/collapse the history for this file
Version 1 (2022, Tuesday, August 2nd at 8:30 pm PST)
Changes:
- Started the file
- Added the
title
section
- Added the
Hello World in Scala
section
- Added the
Simple Hello World in Scala
section
- Added the
Comments in Scala
section
- Added the
Single line comments
subsection
- Added the
Multi-line comments
subsection
- Added the
break keyword in Scala
section
- Added the
Classes in Scala
section
- Added the
Functions in Scala
section
- Added the
other knowledge of the Scala programming language
section
- Added the
Additional comments
section
- Added the
file info
section
- Added the
file history
section
- No other changes in version 1