1. 7

  2. 7

    Yes! This is a common way of working in high-performance systems (e.g. graphics programming). The plural cases (many vertices, many entities…) is more common than the singular case.

    1. 5

      I am reminded of APL/J/K and similar languages. Being primarily array-oriented, this is a very natural way of thinking in such languages.

      Similarly, I believe numpy likes operating on arrays at a time, and let’s you vectorize functions.

      1. [Comment removed by author]

        1. [Comment removed by author]

        2. 3

          I’m not convinced by the argument. You want to handle multiple organizations in parallel on one server (a finite list I hope!), so you’d like to use a language where everything is a stream?

          1. 3

            A slightly different approach, shell pipes-like:

            while ((banana = getBanana()))

            So if bananas arrives slowly (disk IO, network, other calculation…), or even continuously as an endless stream of banana, you can start to eat as they come, rather than once the full banana list is here.

            This also permits distribution of banana eating to multiple workers, possibly across multiple machines according to their current workload.

            But I am no expert! ^_^

            1. [Comment removed by author]

              1. 1

                I did not know lazy evaluation could lead to this. Nice!

            2. 1

              For certain scenarios, I sometimes simulate if statements with listy operations. By using a list of either 0 or 1 elements, you can then compose a wide variety of map/filter/etc. operations that would eliminate a lot of more complex if-based logic. And then when you want to work on n elements, it just works!