From 56457e5b4f911922abcd0cafedb80bcd5dd0ecd2 Mon Sep 17 00:00:00 2001 From: buraq Date: Thu, 22 Jan 2004 17:40:29 +0000 Subject: more questions --- doc/faq/faq.xml | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 2 deletions(-) (limited to 'doc/faq') diff --git a/doc/faq/faq.xml b/doc/faq/faq.xml index fd9bf1e1de..b24f4bc18f 100644 --- a/doc/faq/faq.xml +++ b/doc/faq/faq.xml @@ -17,11 +17,13 @@
+ Why another programming language ? Read the rationale available on the Scala homepage + How can I get an executable program ?

First option: use the Application mixin. Example: @@ -40,19 +42,106 @@ object Foo { Of course you can leave away the specification of the result type. In that case you should take care that your main function does not return something else. The latter would result in the virtual machine not finding -your function +your function.

-
+ + Is Scala stable enough to generate correct code for a + larger scale real life projects? Isn't it dangerous to relay on a + fresh project? + + You should give it a try. It's quite stable and if you +encounter an issue, you can submit the bug and we try to fix it as +quickly as possible. As a workaround you can always implement the +problematic part in Java. + + + +What's the licensing conditions of the available Scala code? Does the Scala team endorse a specific license? + + +Currently, Scala is distributed under a BSD-style +license. Consequently, there are almost no implications +when redistributing the Scala binaries. + + + + + Is it possible to package the generated program so that the +user does not have to install the full Scala environment?

+Basically, I just want to give the user a jar +file which can be started by java -jar ... + +The Scala distribution comes with several jar files +in the lib subdirectory. If you want to package your +Scala application in a way that doesn't require the +user to install the full Scala environment, you simply +have to distribute a copy of the lib/scala.jar file +together with your application. You can even copy the +content of the scala.jar file into your own jar file +if you prefer this. + + + + + + + + + +

+ + + + +I am currently implementing an application in Java. If I go over +to Scala, can I use the existing stuff and link it with the new +Scala code? + + +Accessing Java classes from Scala code is no problem at all. Using a Scala +class from Java can get tricky, in particular if your Scala class uses +advanced features like generics, polymorphic methods, or abstract types. +Since Java doesn't have such language features, you have to know something +about the encoding scheme of Scala classes. Otherwise, there should be +no problems. + + + + +How easy is it to convert Java data structures to Scala, and vice versa? + + +You do not have to convert Java data structures at all for using them +in Scala. You can use them "as is". For instance, Scala classes can +subclass Java classes, you can instantiate Java classes in Scala, you +can access methods, fields (even if they are static), etc. + + + +
+ Why is feature XYZ not integrated ? Convince us that it is useful. Make sure you read -- cgit v1.2.3