OOP the Easy Way
Object-Oriented Programming the Easy Way: a manifesto for reclaiming OOP from three decades of confusion and needless complexity.APPropriate Behaviour
APPosite Concerns
FSF
Category Archives: FP
A little challenge
A little challenge today: create a JS function that turns its arguments into a list of pairs. Actually, the brief was “using Ramda” but I ended up not doing that: function basePairwise(xs) { if (xs.length == 0) return []; if … Continue reading
Posted in FP, javascript
Leave a comment
If Object-Oriented Programming were announced today
Here’s an idea: the current backlash against OOP is actually because people aren’t doing OOP, they’re doing whatever they were doing before OOP. But they’re calling it OOP, because the people who were promoting OOP wanted them to believe that … Continue reading
Posted in FP, OOP
Leave a comment
Dogmatic paradigmatism
First, you put all of your faith in structured programming, and you got burned. You found it hard to associate the operations in your software with the data upon which they act, and to make sure that the expectations made … Continue reading
*-Oriented Programming
Much is written about various paradigms or orientations of programming: Object- (nee Message-) Oriented, Functional, Structured, Dataflow, Logic, and probably others. These are often presented as camps or tribes with which to identify. A Smalltalk programmer will tell you that … Continue reading
Imperative Programming in Swift
A cliche in programming is that certain ways of writing programs make it possible to “reason about” code. So it should be possible to form an argument that proceeds from some axioms to a conclusion about the code we’re looking … Continue reading
Posted in FP, IP
Leave a comment
Protocol-Oriented Programming in Objective-C
Hi, this is a guest post from Crusty. I’ve been doing a tour of the blogosphere, discussing Protocol-Oriented Programming. This time, Graham was kind enough to hand over the keyboard for SICPers and let me write a post here. Back … Continue reading
Posted in FP, OOP
3 Comments
Functional Programming in Object-Oriented Programming in Functional Programming in Swift
The objects that I’ve been building up over the last few posts have arbitrarily broad behaviours. They can respond to any selector drawn from the set of all possible strings. As with all art, beauty is produced by imposing constraints. … Continue reading
Posted in FP, OOP
Leave a comment
Classes in objects in object-oriented programming in functional programming in Swift
So far, Objective-Swift objects have used prototypical inheritance, in which they supply some methods but also know about another object to which they can forward messages they don’t understand themselves. This pattern is used in languages like Self, JavaScript and … Continue reading
Posted in FP, OOP
2 Comments
Mutable objects in immutable objects in object-oriented programming in functional programming in Swift
I didn’t realise this at the time, the previous entry wasn’t the last Objective-Swift post. The inheritance mechanism in ObjS is prototypical, meaning that an object inherits from a single other object rather than getting its behaviour from a class. … Continue reading
Posted in FP, OOP
Leave a comment
This gist shows the result of doing the self-threading talked about at the end of the last post. Each method implementation takes an object pointer and a selector name, just like in the real world. That’s enough Objective-Swift for me. … Continue reading