3 ms·
I prepared this whole rant about how displeased I am with your article and how it doesn't really say anything. Instead I want to recommend that you try Objectiv
by crumblan 14y ago
I prepared this whole rant about how displeased I am with your article and how it doesn't really say anything. Instead I want to recommend that you try Objective C.
You can do most of the string, dictionary, array things using immutable objects, which is nice, and the mutable things like windows are usually used to hold state like positions, colors, etc., and so it's easy to conceptualize what you are mutating:
NSRect frame = [window frame];
frame.origin.x += 5;
[window setFrame:frame];
Singletons are rarely used, mostly for what is basically an event responder (called the application delegate), and objects that are basically a way to group functions (NSFileManager to do IO functions, NSNotificationCenter to send application-wide events).
They've even got a first-class function object.
I have no desire to use Java, and it seems you don't either, but I think you should consider other OOP languages. It's fine to prefer functional programming (I sure do) but if you don't get the visitor pattern, I cannot help but think you don't know enough about it to write OOP off entirely.