====== General questions ======
- [[faqs:general#Why Scala?]]
- [[faqs:general#Who is responsible for Scala?]]
- [[faqs:general#How stable are Scala applications?]]
- [[faqs:general#What JRE should I use to run Scala?]]
- [[faqs:general#Under which license is Scala available?]]
- [[faqs:general#How can I distribute a Scala application?]]
- [[faqs:general#Where do I get the newest version with all the cool bleeding-edge stuff?]]
- [[faqs:general#What do I need to know about class-loaders?]]
- [[faqs:general#Where can I search for documentation and articles about Scala?]]
- [[faqs:general#Where do I submit Scala bug reports?]]
- [[faqs:general#Why are monads useful in Scala?]]
- [[faqs:general#How is "Scala" pronounced?]]
You can also [[faqs:start|go back to the FAQ page]].
===== Why Scala? =====
Experiment in mixing object oriented programming and functional programming.
===== Who is responsible for Scala? =====
Martin Odersky at EPFL.
===== How stable are Scala applications? =====
The Scala compiler is quite stable and generates stable byte-code that will run successfully on most JREs. Only rarely, when pushing the rich possibilities of the language, problems can appear. But since Scala is actively developed, they will usually be fixed quickly when posted on the Scala [[https://lampsvn.epfl.ch/trac/scala|bug-tracking system]].
As a workaround you can always implement the problematic part in Java.
Changes to Scala are marshaled by the [[http://lampsvn.epfl.ch/svn-repos/scala/sip/trunk/sips/sip-00000.xhtml|Scala Improvement Process]], or SIP.
===== What JRE should I use to run Scala? =====
Any JRE supporting Java 1.4 or 5.0 or 6.0 byte-code should work. We regularly test Scala on:
* [[http://java.sun.com/j2se/1.4.2/|Sun HotSpot JRE for Java 1.4.2]], on Linux/x86 and Windows,
* [[http://java.sun.com/j2se/1.5.0/|Sun HotSpot JRE for Java 5.0]], on Linux/x86, Windows, Mac OS X/x86 and Mac OS X/PPC ((Whilst running fine on Apple's Mac OS X for Intel, the Mac OS X PowerPC JVM supports Scala only in interpreted mode. JIT (mixed) mode is **not** supported. Run ''java -Xint'' to deactivate JIT. Interpreted execution is up to 10x slower than JIT execution.)),
* [[http://java.sun.com/javase/6/|Sun HotSpot JRE for Java 6.0]], on Linux/x86, Windows and Mac OS X/x86
* [[http://www.ibm.com/developerworks/java/jdk/|IBM J9 JRE 2.3 for Java 5.0]] on Linux/x86.
* [[http://www.ibm.com/developerworks/java/jdk/|IBM J9 JRE 2.4 for Java 6.0]] on Linux/x86.
HotSpot 1.6 is the standard JRE we use for Scala, and should be the most stable. We have however observed significant speed improvements on Linux when using J9.
===== Under which license is Scala available? =====
Scala is distributed under a [[http://scala.epfl.ch/downloads/license.html|BSD-style license]]. This means that the Scala binaries can be distributed along your own binaries with virtually no strings attached.
===== How can I distribute a Scala application? =====
If you want to distribute a library or a development tool, you should consider uploading it to the scala-dev [[sbaz:start|Scala bazaar]] so that other Scala users can access it.
If you want to distribute a standalone application, you should follow the same procedure as with any program for the backend you are targeting. For the JVM, just remember to include scala-library.jar in addition to a jar of all your Scala-compiled class files.
See [[code:compressed-executable-jar|Compressed Executable JAR]] for a way to tightly compress the Scala library jar and your application.
===== Where do I get the newest version with all the cool bleeding-edge stuff? =====
You can get a distribution built from recent sources in [[http://www.scala-lang.org/downloads/distrib/files/nightly/|the nightly builds repository]].
To get the very latest Scala compiler and library, you need to use the development version from the SVN repository and build it yourself. To do that, you need to:
- Using [[http://subversion.tigris.org/|SVN]], download the sources to your machine: $ svn checkout http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk/ scala
$ cd scala
- Using [[http://ant.apache.org/|Ant]], compile your very own distribution of the sources: $ ant dist
- You could run (UNIX only) the test suite to make sure this particular snapshot is a good one: $ test/scalatest
- A new Scala distribution will now be available in: dists/latest/
- To update to the latest sources, run: $ svn update
$ ant dist
===== What do I need to know about class-loaders? =====
Nothing. There used to be a limitation in early versions of Scala 2 that forced user classes to be in the same class-loader as the Scala library. This is no longer the case.
===== Where can I search for documentation and articles about Scala? =====
As the "scala" word has many different meanings, it's sometime difficult to search for documentation about Scala on Google and similar search engines. Carlo Bonamico has created a specialized search engine (using [[http://www.google.com/coop/cse/overview]]) at
[[http://www.carlobonamico.com/scala.php]]
which focuses search on a list of Scala-related websites and mailing lists.
It's also possible to contribute to the search engine by submitting additional sites.
===== Where do I submit Scala bug reports? =====
The Scala [[https://lampsvn.epfl.ch/trac/scala|bug-tracking system]] lists the outstanding
and fixed bugs in the Scala compiler, library, runtime, and documentation.
===== Why are monads useful in Scala? =====
People new to functional programming frequently ask why monads are useful, especially in a language like Scala which allows side effects. This section lists quotes from people who have used monads to good result. It avoids being abstract (monads have mathematical grounding) and code (here's how you build a JSON parser with monads).
The idea is to give enough motivation to justify the effort to learn and use monads.
- Continuations for a chat server and NIO
"Thomas Hofer did a Scala framework for Jetty -- a chat server program just shrunk from
400 lines to 100 lines using his library, and the 100 lines are much
easier to read and cleaner than the original 400 lines. Antoine Yersin
did a library to wrap java.nio. Again client programs become
dramatically simpler and shorter."
"Both libraries advance the state of the art and have great potential
in my opinion. They are both based on a little class in the standard
Scala library called scala.Responder. This class embodies the
standard monad of continuations."
-- Martin Odersky
===== How is "Scala" pronounced? =====
The authoritative source is Martin Odersky's pronunciation in
http://video.google.com/videoplay?docid=553859542692229789
at about 1:16 into the video.
The two 'a's in Scala are soft, pronounced like the two 'a's in "Java".
(However, Martin also acknowledged the "American" pronunciation
with the first 'a' being a hard 'a' as in "scalability".)