Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I actually like Scala.

I teach it to complete beginners to programming and generally it goes great - there is a huge demand for junior Scala developers in my neck of woods.

However when I found that 22 argument monster a while ago it was a bit of a wtf moment to me.

Why 22? Why not 21 or 23 ? Is it one of those no one is going to need more than 22 arguments?



22 is just arbitrary.

> Is it one of those no one is going to need more than 22 arguments?

You can work around this limit with nested tuples, or just defining Function23 yourself. Although if your function accepts 23 arguments, you should probably refactor that anyways.

It is also worth noting that Scala 3 drops this limitation by implementing function arguments with arrays: https://github.com/lampepfl/dotty/pull/1758




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: