DEV Community

Discussion on: Language Idea: Limit custom types to three arguments

Collapse
 
jvanbruegge profile image
Jan van Brügge

There is a very good rule of thumb, the zero, one, infinity rule. The main point is, that if you put random limitations (ie not forbidding or allowing just one, but more than one but not more than x) this limitation will always feel abitrary.
This is one of the many reasons why I would never consider elm for production use, the language is working against you and your domain.

Collapse
 
pdamoc profile image
Petre Damoc

more than one but not more than x) this limitation will always feel abitrary.

The is a limit to how many things can a person keep in working memory at the same time. This limit is around 4 for most people. So, 3 is a good number as it still leaves some space. It is not arbitrary. Joining things into a record would "chunk" them and turn them into one thing.

Collapse
 
robinheghan profile image
Robin Heggelund Hansen

This idea is only there to make it more explicit what your code does. There's nothing here that limits what one can do with Elm, so I don't understand what about this make you uneasy to use it in production?

Collapse
 
qm3ster profile image
Mihail Malo

Because this looks like a linter's job.
It's absolutely unacceptable that you can't just jam in one more parameter but must refactor all existing sites first.