Should I study Scala? [closed]

Portability: Linux and Windows at least I hope. What about mobile phones, did anyone succeed in getting it to run there? Yes. There is quite some movement about Scala on Android. As for J2ME, I saw something in that respect, but not much. There is some code pertaining to J2ME on the source code repository. … Read more

Is Clojure compiled or interpreted?

Clojure is always compiled. The Clojure compiler produces Java byte code, which is typically then JIT-compiled to native code by the JVM. The thing that can be confusing is the dynamic and interactive nature of Clojure that means you can invoke the compiler at run-time if you want to. This is all part of the … Read more

Is there anything like VirtualEnv for Java?

From what I understand, virtualenv enables you to have separate library installation paths, effectively separate “virtual” Python installations. Java doesn’t have the concept of a “system-wide installed” library(*): It always searches the classpath for the libraries to be loaded. Since the classpath can be (and needs to be!) defined for each application, each application can … Read more

How are coroutines implemented in JVM langs without JVM support?

tl;dr Summary: Particularly this proposal says that to implement this feature in the language the additional JVM support will be required. When they say “required”, they mean “required in order to be implemented in such a way that it is both performant and interoperable between languages”. So how this feature is implemented without additional support … Read more

What is the difference between def foo = {} and def foo() = {} in Scala?

If you include the parentheses in the definition you can optionally omit them when you call the method. If you omit them in the definition you can’t use them when you call the method. scala> def foo() {} foo: ()Unit scala> def bar {} bar: Unit scala> foo scala> bar() <console>:12: error: Unit does not … Read more

Haskell on JVM?

You may want to investigate Frege. Quoting from that page: “Frege is a non-strict, pure functional programming language in the spirit of Haskell.” “Frege programs are compiled to Java and run in a JVM.” Based on a brief perusal of the language specification, Frege looks to be nearly a Haskell clone. Perhaps the phrase “in … Read more

How to approach creating a JVM programming language?

I would also recommend ASM, but have a look at Jasmin, I used it (or, rather, had to use it) for a university project, and it worked quite well. I wrote a lexer-parser-analyzer-optimizer-generator combination for a programing language using Java and Jasmin, so it was generating JVM Code. I uploaded the code here; the interesting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)