Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> scala questions


Copy link to this message
-
scala questions
I've gotten to know y'all a bit, so I would like to ask my question here.  :)

I am fairly unfamiliar with Scala, having worked a chapter or 2 out of a scala book I bought.  My understanding is that it is both an object language and a functional language.  The only language I am extremely familiar with, that is this way, is Smalltalk.  Smalltalk is a dynamic late-binding, strongly-typed language.  My understanding is scala is a explicitly typed language, but does this mean it is a static, early-binding language?  

Closures, and I suppose functions, must be or optionally could be compiled at runtime.  Are they?  I realize they capture their environment at creation-time (runtime), but does that mean the code gets compiled to byte code at that time, or is it possible to use a Mirror to compile it at runtime?  It is extremely important to be able to do this, for me, and I am pretty sure it can do this.  I mean, duh!

I think scala has immutable objects, is it so?  Apria?   so, my question: what about object references?  Can they be mutable by choice?  Here's what I need, and I need a language that supports it, and if that language is callable from  java, then I can support this feature on the jvm, callable by java and groovy.  I would rather they be implemented in scala, due to performance, unless scala already has the feature.

Mutability is required for a reference mutation from an eventual reference to a stable reference or a broken reference.  It is useful to not require a wrapper around a mutable ref.  Does scala have an any type, with polymorphic runtime dispatch?

Is there a cross-compiler that will convert java to scala?

thank you for your responses,
rob