Ad
  • Custom User Avatar

    @trashy_incel thank you for that. I have a copy of that site stashed in /home/ and it looks like I didn't visit that page yet. Of course I should consume it more diligently. But it seems to indicate that the specific thing I refer to (and I thought also Mysliwy when saying: "element {func2, func1} (not sure how to name this element, any idea?)") is exactly one part of a compound literal expression, called... an initializer list.

    I guess you would still say I'm being insufficiently precise when I said "making the list into a nameless array" while the nameless array is really only being initialized with it.

  • Default User Avatar

    this is called a compound literal

    an initializer list on the other hand is the {1, 2, 3} in int array[] = {1, 2, 3}

  • Default User Avatar

    You got it. The element is called initializer list. It's a neat trick I first learned on Codewars, making the list into a nameless array just for immediately selecting one item from it.