Category Archives: FP

Further Advances in Objective-Swift

Previously on SICPers, I defined objects as functions that return methods and built dynamic method dispatch in this object system. It’s time to tie up some loose ends. Proper selectors In languages like Smalltalk and Objective-C, an object’s range isn’t … Continue reading

Posted in FP, OOP | Leave a comment

Dynamic Method Dispatch in Object-Oriented Programming in Functional Programming in Swift

In the previous episode, I said that objects are functions that map their ivars onto methods. However, the objects that I demonstrated in the post were tables, structures of functions that closed over the ivars, like this: struct List<T> { … Continue reading

Posted in FP, OOP | Leave a comment

Object-Oriented Programming in Functional Programming in Swift

The maths behind functional programming predates computers. Once people had some experience with both of these things, they stripped them down and created object-oriented programming. It’s still possible to jettison a lot of the features of functional programming and work … Continue reading

Posted in FP, OOP | 5 Comments

A subtle [mis]understanding of monads

As I said when talking about Learning Phases, one of the things that happens when I’m trying to learn a new thing is that I build an analogy in terms of something I do understand. This can be dangerous when … Continue reading

Posted in FP, OOP | Leave a comment