DEV Community

Discussion on: Some reasons to avoid Hashes in Ruby and some alternatives to them.

Collapse
 
ilya_sher_prog profile image
Ilya Sher

But I have A TON of parameters

Red flag: bad design with high probability. Typically, functions/methods should not take many parameters.

Collapse
 
nflamel profile image
Fran C.

Agree 100% but... (you know, there's always a "but") Sometimes that's not something you can control or not as much as you would like to.

Something I forgot to add is that using a Hash for this doesn't fix the problem which is, as you pointed out, a design problem. It would only hide it and make it harder to fix.