I've got this situation in Julia where my first instinct would be to use a struct with a ton of different fields (more than 10).

Since Julia isn't OOP though, there's essentially only constructors, and passing in so many parameters is unwieldy. In OOP-land I would make a builder for such a large number of parameters, but that doesn't really fit into the paradigm.

There's not a logical way to split up the structs, there's at least a group of 10 that all go together.

Any thoughts?
#julialang

@urusan Tough problem. This is hardly ideal, but is it possible to break up the group of 10 fields into two or three groups of two or three fields each that are logically near each other and at least replace your 10 argument constructor with building a few substructures and then passing them in?

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.