|
|
|
|
|
by iron_ball
5637 days ago
|
|
Does anyone really think that Obj-C is elegant and powerful in the same way Python, Ruby, or Clojure are? If so, I would like to hear the arguments for it. edit: I understand that the iOS SDK is well-thought-out and easy to work with, but there could have been an equally good API for Python, Ruby, or (if your argument is performance) one of the more performant lisps. I don't think the SDK alone justifies Obj-C. |
|
The iOS SDK is elegant and powerful in a different way. There is more syntax. Designs tend toward more exposed entities. However, there is less coupling to particular implementation strategies.
Let's take operations on dates as an example, specifically jumping to "the same day of the next month." This is not as simple as you might think at first, since months vary in length in an arbitrary pattern. In many high-level language libraries, you simply grab your date and you do a single call. (In Ruby: Date.today >> 1) With iOS, you end up having to use 3 different objects. (Calendar, Date, and DateComponents)
Working in Objective-C reminds me of the best of "mainstream" Object Oriented programming from the mid 90's. There is a bit too much arcana, seemingly too many entities, but if you work through some real examples, you find that some good thought was put into things.