What tools are there for functional programming in C?

后端 未结 13 829
长情又很酷
长情又很酷 2021-01-29 17:18

I\'ve been thinking a lot lately about how to go about doing functional programming in C (not C++). Obviously, C is a procedural language and doesn\'t really support f

13条回答
  •  余生分开走
    2021-01-29 17:47

    If you want to implement closures, you'll have to get groady with assembly language and stack swapping/management. Not recommending against it, just saying that's what you'll have to do.

    Not sure how you'll handle anonymous functions in C. On a von Neumann machine, you could do anonymous functions in asm, though.

提交回复
热议问题