3 ms·
Closures are different from objects in only a couple of ways: (1) the creation protocol is extremely concise (lambda) (2) the access interface is the function c
by ericbb 17y ago
Closures are different from objects in only a couple of ways:
(1) the creation protocol is extremely concise (lambda)
(2) the access interface is the function call
Say that closures lower the syntactic overhead of accessing
the same flexibility he normally turns to objects for.
So if he uses closures he will effectively use objects in
more situations simply because it becomes easier and this
will increase the flexibility of his code.