1. 4

An odd idea lead me to this. If you want to point out why C is sometimes deficient when doing nice functional things, this is a good place to start.

  1.  

  2. 2

    So all he wants is to be able to replace

    void f(void) { g(x,y,z); }

    with something that allows him to avoid the definition of f? Really?

    Also “partial function” to mean “curried function” is confusing as hell.

    1. 2

      It’s confusing only if you conflate “curried function” with “partial(ly applied) function”; remember that currying a function converts (A, B, …) -> Z to A -> B -> … -> Z. See https://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application

      1. 1

        Of course, in mathematics “partial function” means “not defined on all elements of the domain”.

    2. 1

      I’m 100% sure there’s some ugly way to make it work in C, but I’m also 100% sure it shouldn’t be done.

      If it’s that big of a deal, just use a language that has it built in. No doubt the compiler for that language will have a better implementation than hacking your own into C.