Scala's `new` syntax is an anomaly. I'd rather say `new[Foo](x, y, z)`, or just `new(x, y, z)` if `Foo` is the expected type.
@viktorklang Yes, that's what I wanted to do. @xeno_by said I couldn't access the expected type, so `alloc(bar, baz): Foo` would never work.
-
-
@propensive@xeno_by Could you elaborate on that? :-) -
@viktorklang Yeah, I wanted to write a whitebox macro to use type inference from the expected type to choose which class gets instantiated.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.