5 ms·
It’s not puke inducing, but it is verbose. The language designers just took a different approach to how to write code. Just for some background, it came out at
by kenver 8y ago
It’s not puke inducing, but it is verbose. The language designers just took a different approach to how to write code. Just for some background, it came out at a similar time to c++. Both were designed to be a ‘better c’
- Apocryphon 8y agoPersonally I prefer the brackets of ObjC to the colon overload of C++
- saagarjha 8y ago> the colon overload of C++ There's a lot of colons here too: - (id)outputImageProviderFromBufferWithPixelFormat:(NSString *)format pixelsWide:(NSUInteger)width pixelsHigh:(NSUInteger)height baseAddress:(const void *)baseAddress bytesPerRow:(NSUInteger)rowBytes releaseCallback:(QCPlugInBufferReleaseCallback)callback releaseContext:(void *)context colorSpace:(CGColorSpaceRef)colorSpace shouldColorMatch:(BOOL)colorMatch;
- Apocryphon 8y agoYes, but they don't come in pairs and are neatly spaced away from each other.
- saagarjha 8y agoThis was mainly meant as a joke :)
- iainmerrick 8y agoIn other languages, a function with that many parameters would be close to unusable. Far too easy to get them mixed up. The way Obj-C forces you to name each argument is great.
- saagarjha 8y agoYeah, I'm not complaining, I really do like argument labels. Objective-C sometimes does go overboard with sentence-like labels, but usually it's not an issue.
- sjwright 8y agoI did some iPhone dev a few years ago. In terms of writing code, I didn’t mind the verbosity because Xcode’s autocomplete worked well enough. It’s not like you actually have to type it all out. In terms of reading code, its verbosity mainly affects the horizontal dimension, which is strongly mitigated by the proliferation of large widescreen displays. In terms of learning the language, the verbosity combined with the autocomplete arguably reduced the need to continually refer back to documentation, as the verbose method (message) names were oftentimes self explanatory.
- TimmyMustGo 8y agoObjective-C itself is not verbose, method names can be as long or as short as you like. You can have method names with only colons if you want: - (void):(id)param1 :(id)param2 :(id)param3 Keyword names do not have to be unique such as: - (void)drawLine:(id)gfxContext x:(double)x1 y:(double)y1 x:(double)x2 y:(double)y2 Cocoa/Cocoa Touch is verbose, but Objective-C is not (it is by far my favorite programming language)
- mpweiher 8y agoInterestingly, Objective-C was not at all designed to be a "better C", it was designed to be, roughly speaking, a more practically useful Smalltalk. This is all laid out in great detail in the wonderful Object Oriented Programming: an Evolutionary Approach.
- kenver 8y agoAh my bad, I misremembered a talk I heard once. I'll check out the book. Thanks.
- protomyth 8y agoWhile you are looking, Brad Cox’s other book Superdistribution: Objects as Property on the Electronic Frontier is well worth a read to get a feel for where he wanted to go.
- boomlinde 8y agoWhatever their intentions were, it was designed to be a "better C" in the sense that it's a strict superset of the C language.