This channel is now CLOSED. Please use gitter.im/scala/scala for user questions and gitter.im/scala/contributors for compiler development.
__ * 2
to mean expanding to the next enclosing Expr? Inductively for ___
and up, of course. I guess that would make arbitrarily long underscores reserved. That's OK, because then usage of case _________ =>
for alignment purposes can be more narrowly defined for the default case.
inline
and @specialized
play together? I wrote a small library for specialized collections and used macro trickery to escape most specialization problems ( https://github.com/denisrosset/metal -- warning the macro use is quite gross).
metal
was to have nonspecialized traits, but specialized methods... so you call (set: MySet[A]).contains[A](a)
, where the first type parameter is nonspecialized (MySet[A]
), but the magic happens in the def contains[@specialized B](b: B)
. The macro system is there to put the right type parameters.
Map[@sp A, @sp B]
fails to specialize for e.g. Map[AnyRef, Int]
.