Consider the following:
class A(foo: Int)(bar: Int)(baz: Int)
object A{
def apply(foo: Int)(bar: Int)(baz: Int) = new A(foo)(bar)(baz)
}
With the apply method I can do the following:
scala> A(1)(2)(3)
res12: Script.A = Script$A@7a6229e9
scala> A(1)_
res13: Int => (Int => Script.A) = <function1>
Why is it that I can't do the following:
scala> new A(1)_
<console>:21: error: missing arguments for constructor A in class A
new A(1)_
^
Am I missing something syntax wise? I thought constructors are meant to be just methods on the class, so they should be lifted to functions when needed (much like the apply method above)