1. 22
    1. 3

      Lil is really really cool. I’ve never worked with vector/array languages before, so this explanation feels vaguely magical, but I know it’s gotta be fairly simple under the hood.

      1. 3

        If you’d like to see more examples and explanation of these sorts of features Lil, The Vector Language from the reference manual might be worth looking at.

        edit: in case you meant implementation-wise, it doesn’t get much simpler than how dyads_atomic() works in the Awk implementation of Lil: recursive calls for the cases where one or both arguments are lists/dictionaries, and each primitive only needs to handle being applied to a pair of atomic values.

      2. 1

        The thing about array languages that makes them hard for me to read is that function application is polymorphic on the dimensionality of the argument, which makes naming that much more important.