News for hackers. Stuff that matters.
Re:What is “Open Recursion”? by TeMPOraL on Wednesday July 19, 2017 @05:25AM (#14802973)
I think this is a rectangle/square problem. When you say you accept/return a closure, you probably mean a "function + lexical scope of 0 or more variables". You can still refer to "non-closures" as functions, though.

It's like code expecting rectangles wouldn't mind to get squares, but a code expecting squares will definitely do mind getting rectangles.

Re:What is “Open Recursion”? by kukx on Wednesday July 19, 2017 @07:05AM (#14803416)
>It's like code expecting rectangles wouldn't mind to get squares, but a code expecting squares will definitely do mind getting rectangles.

It is actually not that obvious since in OOP neither a square or a rectangle type is properly a subtype of the other. [0]

I understand how implementation-wise it could be convenient to treat a function as a closure. Although, I would prefer some other type, eg:

    functoid := closure | function
[0] - https://stackoverflow.com/questions/1030521/is-deriving-squa...