scala-2.9
Reference a constructor argument from a trait
In Scala, is it possible for a trait to reference a named constructor argument of the class it is mixed into? The code below doesn\'t compile because ModuleDao\'s constructor argument is not a val as[详细]
2023-04-12 03:27 分类:问答ParVector map is not running in parallel
I have a bit of code like: val data = List(obj1, obj2, obj3, obj4, ...).par.map { ... } and the ParVector is roughly 12 elements large. I noticed that all of my work is being done in the main threa[详细]
2023-04-08 01:59 分类:问答Strange behavior of Set4 in scala 2.9.1?
Making a migration from 2.8.1 to 2.9.1 found interesting thing. Tried to write this in console: >>import collection.immutable.Set.Set4[详细]
2023-04-05 06:18 分类:问答What are main changes from scala 2.8.1 to scala 2.9.1?
I am working on project implemented in scala 2.8.1, want to migrate to scala 2.9.1 and use akka-actors libraries instead of standard, but didn\'t find good summary of main changes, here what I found:[详细]
2023-04-05 04:29 分类:问答Why do case classes extend only Product and not Product1, Product2, ..., ProductN?
after I learned that case classes extend Product, I wondered why they do not extend ProductN. E.g., given a code like:[详细]
2023-04-03 02:30 分类:问答Scala case class constructor with WrappedArray argument
I have the following scenario: sealed abstract class Type(val inUse: Boolean) case class IntTy(override val inUse: Boolean) extends Type(inUse)[详细]
2023-04-02 15:27 分类:问答Scalac Memory Usage
I\'ve been trying to compile the NeHe tutorial for scala (link) and scalac (2.9.0, linux) uses up all my ram and then some. I basically can\'t compile it.[详细]
2023-04-01 21:46 分类:问答Confusing Scala Dynamic code snippet
I came across the following code snippet on the Scala mailing list: scala> class DynamicImpl(x: AnyRef) extends开发者_如何学运维 Dynamic {[详细]
2023-03-22 12:21 分类:问答Methods in trait become volatile methods when mixed in concrete classes in 2.9.0-1 but not 2.8.1
I noticed this breaking (for me using it with OGNL) change in 2.9.0-1: I find that, in 2.9, methods declared in a trait become volatile when mixed in a class:[详细]
2023-03-22 02:50 分类:问答Case classes and Proxy behaviour in Scala 2.9
On migrating our code to Scala 2.9 we\'ve found large swathes of it that didn\'t work and failed silently. We tracked it down to case classes that extend Proxy not being equal. In our code we don\'t e[详细]
2023-03-19 13:13 分类:问答