r/badcode • • Apr 07 '21

java Apparently Java can only handle 255 parameters in a constructor...

Post image
4.0k Upvotes

249 comments sorted by

View all comments

Show parent comments

2

u/deegeese Apr 08 '21

You’re proving my point.

A math function that takes a dozen parameters for the matrix elements is a bad design because they could just pass an array.

When Python functions take a ton of parameters, it’s usually because most of them are optional and it’s just syntactic sugar vs passing a dict for configs.

1

u/Lost4468 Apr 08 '21

A math function that takes a dozen parameters for the matrix elements is a bad design because they could just pass an array.

Most do, they allow both. There's plenty of valid reasons you might want both.

And yes there are still plenty of maths functions where it does not make sense to house them in an array.

When Python functions take a ton of parameters, it’s usually because most of them are optional and it’s just syntactic sugar vs passing a dict for configs.

Literally what I already said.