Skip to content

Commit 8e641c6

Browse files
authored
Merge pull request #3127 from gkepka/scala-book-prelude-preliminaries
Scala 2 Book migration - Prelude and Preliminaries
2 parents dbe095e + d13948f commit 8e641c6

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

_overviews/scala3-book/introduction.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ Scala’s syntax, grammar, and features have been re-thought, debated in an open
2525
The book begins with a whirlwind tour of many of Scala’s features in the [“A Taste of Scala” section][taste].
2626
After that tour, the sections that follow it provide more details on those language features.
2727

28-
{% comment %}
29-
We should have a link structure on the whole tour here
30-
{% endcomment %}
28+
## A bit of background
29+
30+
Scala was created by [Martin Odersky](https://en.wikipedia.org/wiki/Martin_Odersky), who studied under [Niklaus Wirth](https://en.wikipedia.org/wiki/Niklaus_Wirth), who created Pascal and several other languages. Mr. Odersky is one of the co-designers of Generic Java, and is also known as the “father” of the `javac` compiler.
3131

3232
[reference]: {{ site.scala3ref }}/overview.html
3333
[taste]: {% link _overviews/scala3-book/taste-intro.md %}

_overviews/scala3-book/taste-intro.md

+36
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,42 @@ can be installed by following our [getting started guide][get-started].
2121
> Alternatively you can run the examples in a web browser with [Scastie](https://scastie.scala-lang.org), a
2222
> fully online editor and code-runner for Scala.
2323
24+
## Comments
25+
26+
One good thing to know up front is that comments in Scala are just like comments in Java (and many other languages):
27+
28+
{% tabs comments %}
29+
{% tab 'Scala 2 and 3' for=comments %}
30+
```scala
31+
// a single line comment
32+
33+
/*
34+
* a multiline comment
35+
*/
36+
37+
/**
38+
* also a multiline comment
39+
*/
40+
```
41+
{% endtab %}
42+
{% endtabs %}
43+
44+
## IDEs
45+
46+
The two main IDEs (integrated development environments) for Scala are:
47+
48+
- [IntelliJ IDEA](/getting-started/intellij-track/building-a-scala-project-with-intellij-and-sbt.html)
49+
- [Visual Studio Code](https://scalameta.org/metals/docs/editors/vscode/)
50+
51+
## Naming conventions
52+
53+
Another good thing to know is that Scala naming conventions follow the same “camel case” style as Java:
54+
55+
- Class names: `Person`, `StoreEmployee`
56+
- Variable names: `name`, `firstName`
57+
- Method names: `convertToInt`, `toUpper`
58+
59+
More on conventions used while writing Scala code can be found in the [Style Guide](/style/index.html).
2460

2561
[reference]: {{ site.scala3ref }}/overview.html
2662
[get-started]: {% link _overviews/getting-started/install-scala.md %}

0 commit comments

Comments
 (0)