News for hackers. Stuff that matters.
Re:Bringing Objective-C to the Amiga by kenver on Sunday April 22, 2018 @10:07PM (#16900000)
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’
Re:Bringing Objective-C to the Amiga by sjwright on Sunday April 22, 2018 @10:55PM (#16900173)
I 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.

Re:Bringing Objective-C to the Amiga by mpweiher on Monday April 23, 2018 @01:41AM (#16900778)
Interestingly, 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.

Re:Bringing Objective-C to the Amiga by boomlinde on Monday April 23, 2018 @09:09AM (#16903061)
Whatever their intentions were, it was designed to be a "better C" in the sense that it's a strict superset of the C language.
Re:Bringing Objective-C to the Amiga by kenver on Monday April 23, 2018 @06:51AM (#16902186)
Ah my bad, I misremembered a talk I heard once. I'll check out the book. Thanks.
Re:Bringing Objective-C to the Amiga by protomyth on Monday April 23, 2018 @07:20AM (#16902338)
While 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.
Re:Bringing Objective-C to the Amiga by TimmyMustGo on Monday April 23, 2018 @12:20AM (#16900497)
Objective-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)

Re:Bringing Objective-C to the Amiga by Apocryphon on Sunday April 22, 2018 @10:26PM (#16900072)
Personally I prefer the brackets of ObjC to the colon overload of C++
Re:Bringing Objective-C to the Amiga by saagarjha on Monday April 23, 2018 @12:41AM (#16900564)
> 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;
Re:Bringing Objective-C to the Amiga by iainmerrick on Monday April 23, 2018 @04:06AM (#16901433)
In 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.
Re:Bringing Objective-C to the Amiga by saagarjha on Monday April 23, 2018 @04:20AM (#16901499)
Yeah, 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.
Re:Bringing Objective-C to the Amiga by Apocryphon on Monday April 23, 2018 @02:10AM (#16900893)
Yes, but they don't come in pairs and are neatly spaced away from each other.
Re:Bringing Objective-C to the Amiga by saagarjha on Monday April 23, 2018 @04:20AM (#16901501)
This was mainly meant as a joke :)