1

I’m curious if anonymous functions are possible and acceptable (by which I mean, possible, but not necessarily “good”) in C. I haven’t heard of it before, but I don’t want to look silly disagreeing with someone who might say it is (but won’t produce an example).

In this other SO Q&A, it seems like it’s possible in a specific case of GNU C, but doesn’t address it more generally.

NonCreature0714
  • 5,744
  • 10
  • 30
  • 52
  • 3
    It's not possible in pure standard C. And if you intend to ask me to prove a negative, I present to you [n1570](https://port70.net/~nsz/c/c11/n1570.html). The last draft before publication of C11. You'll find there is no provision for it. – StoryTeller - Unslander Monica Feb 04 '18 at 20:08
  • 1
    The linked answer explains how the effect is achieved using GNU extensions. There is no standard way to do it. – Sergey Kalinichenko Feb 04 '18 at 20:10
  • @StoryTeller If I understand you correctly, you want some clarity over whether I'm asking to prove a negative. I.E., prove it's NOT possible to have anonymous functions in C. I'm actually asking if it IS possible, however, I don't think it is based on my informal exposure to C and general assumptions derived from practice. Thanks for the like to the standard BTW :) – NonCreature0714 Feb 04 '18 at 20:14

0 Answers0