I have worked extensively in C, and have done work in C++, Java and VisualBasic and RealBasic (and I'm just getting started in C#). While the square brackets are jarring at first sight, I caught on pretty quick and grew to really like the look of ObjC.
I love the labels on the methods. It makes code self-documenting and has given me fresh disdain for the argument lists all of the other languages use. For example, when I do a qsort() in C, I have to think really hard (or dig up the documentation) to remember is the first size_t the number of items to sort or the size of each individual item?
I've only used categories a few times, but it is a great way to add the exact functionality you need to a big honkin' class easily. Other languages either cannot do this at all, or it is not nearly as easy.
I like the idea of Automatic Garbage Collection only if the ability to do manual memory management remains as an option. With current computing power, I believe the "hit" you take for using AGC is imperceptible to the user in most applications. Nevertheless, if I ever have to write something that is so demanding that AGC becomes a noticeable liability, I'd like to have the ability to specify the exact lifetimes of each object.
One thing I'd like to see in ObjC is a real decision about designated initializers. The "book" states they exist, but in practice, it is not always clear which of the -init... methods is the DI, and if you don't have access to the source code, you cannot know whether all other inits use it. Sometimes you are lucky and the developer has kindly put a comment in about which method is the DI, but I wish there were some syntax that denoted it uneqivocally. Or, abandon the DI altogether and suggest it as a design practice only.
by macFanDave — Jan 01
I have worked extensively in C, and have done work in C++, Java and VisualBasic and RealBasic (and I'm just getting started in C#). While the square brackets are jarring at first sight, I caught on pretty quick and grew to really like the look of ObjC.
I love the labels on the methods. It makes code self-documenting and has given me fresh disdain for the argument lists all of the other languages use. For example, when I do a qsort() in C, I have to think really hard (or dig up the documentation) to remember is the first size_t the number of items to sort or the size of each individual item?
I've only used categories a few times, but it is a great way to add the exact functionality you need to a big honkin' class easily. Other languages either cannot do this at all, or it is not nearly as easy.
I like the idea of Automatic Garbage Collection only if the ability to do manual memory management remains as an option. With current computing power, I believe the "hit" you take for using AGC is imperceptible to the user in most applications. Nevertheless, if I ever have to write something that is so demanding that AGC becomes a noticeable liability, I'd like to have the ability to specify the exact lifetimes of each object.
One thing I'd like to see in ObjC is a real decision about designated initializers. The "book" states they exist, but in practice, it is not always clear which of the -init... methods is the DI, and if you don't have access to the source code, you cannot know whether all other inits use it. Sometimes you are lucky and the developer has kindly put a comment in about which method is the DI, but I wish there were some syntax that denoted it uneqivocally. Or, abandon the DI altogether and suggest it as a design practice only.
Happy New Year, everyone!