A question about redefining a function in Julia

There already have been a number of topics on how to organise many method arguments, such as

and we are starting to get off-topic here, but in general you would just group your arguments into (one or multiple) structs, (named) tuples, …

This example is also just very artificial. You destructure your generator to 19 variables, which you then later combine again. Instead you could have just defined (e.g.) vec = Tuple(rand(1000) for _ = 1:19) and function loop_over_global(vec) ... end.

2 Likes