5 ms·
AbstractFunction, Function, Product and Tuple are all still limited to 22. Increasing the limit would create too much bytecode, and in the current design, lift
by gourlaysama 12y ago
AbstractFunction, Function, Product and Tuple are all still limited to 22.
Increasing the limit would create too much bytecode, and in the current design, lifting the limit is just impossible (without runtime code generation or custom classloader, etc.).
- film42 12y agoSo why did they choose to allow case classes to have arbitrary arity? Not that I'm complaining, I just don't understand the underworking of scala that well.
- frowaway001 12y agoThey just don't emit all the boilerplate which would require unlimited-arity Tuples/Functions/... for larger case classes.
- acjohnson55 12y agofilm42: I think it was driven by Slick and the need to accommodate database tables with more than 22 columns
- neverminder 12y agoIndeed, because the fallback is HList and when I have tables up to 200 columns it's killing the CPU and crashing Scala IDE up to the point where you just can't work with it.