First of all, I am completely new to scala. But I have many years of experience in programming for high performance computing (fortran, later python) as well as functional programming (Wolfram Mathematica). So, I understand the basic concepts of the language quite well, but unfortunately I cannot penetrate its organization. My basic problem is that I cannot find the stuff that interests me in one place. All the information is dispersed over many sites. Therefore, I would appreciate answers with a couple of well targeted links.
Below I will describe a few of my very basic questions. They are so short and simple that it make no sense to split them in several posts.
-
Scala 2 vs. Scala 3. I learnt that they are very different languages. Scala 3 is essentially not backward compatible. There is no full documentation. Does it mean that one should start with Scala 2? What are the pros and the contras?
-
Style: 2 spaces is recommended indent for Scala 2, whereas the proper spacing is mandatory in Scala 3. This means a dedicated editor is needed and I cannot use my favorite Emacs editor, right? I am a bit skeptical about IntelliJ IDEA because it is a huge tool. The .dmg package for MacOS is 776MB. I already have a huge Anaconda on my laptop. With only 5GB free space currently available I simply cannot effort this tool.
-
Exactly due to the space limitation, I cannot install many packages via
brew
because it insists on installing the fullxcode
. Can one get along withoutxcode
? My attempt to installMetals
foremacs
was therefore not successful. What would be the minimal tool to typesbt
projects? -
Assume I want to find a documentation on the
MurmurHash3
function from the standardscala
library, where I have to look? -
I can compile a program with
scalac
, it can also generate.jar
files. However, there are cases when java cannot run this file because it does not include Scala stdlib. Does it mean thatscalac
is useless and one should go withsbt
even for tiny projects? -
On my laptop I currently have 3 versions of java, one is from Apple, and in the course of work I had to install two more:
java version “1.8.0_321”
Java™ SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot™ 64-Bit Server VM (build 25.321-b07, mixed mode)java version “17.0.2” 2022-01-18 LTS
Java™ SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot™ 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing)
Which one should be preferred?
I am sorry for being so incoherent. I am just trying to understand things and organize myself. Therefore your suggestions on how to do scala
programming with minimal tools, however not interactively are super welcomed.