[ prog / sol / mona ]

prog


Jsonnet, Nix and POO

1 2023-08-29 06:00

http://webyrd.net/scheme_workshop_2021/scheme2021-final91.pdf
https://invidious.poast.org/watch?v=ckXkIlhUWss
https://github.com/fare/gerbil-poo

;Object Orientation in 38 cons cells of standard Scheme.
(define (fix p b) (define f (p (lambda i (apply f i)) b)) f)
(define (mix c p) (lambda (f b) (c f (p f b))))

We will make the case that the above two definitions summarize the essence of Object-Oriented Programming (OOP), and that all the usual OOP concepts can be easily recovered from them—all while staying within the framework of pure Functional Programming (FP)

2 2023-08-29 15:36

Interesting, I will have to work through it, but if you have already did so, can you tell us how does it compare to ``Object-Oriented Style''?
https://legacy.cs.indiana.edu/~dfried/ooo.pdf

3 2023-08-29 19:14

>>2
I haven't read Friedman's paper but Nix and POO are prototype-based OOP (like Self or Javascript), not class-based OOP.

4


VIP:

do not edit these