News for hackers. Stuff that matters.
Re:Remember Smalltalk? (2008) by chc on Wednesday February 12, 2014 @02:30PM (#7226666)
It's nice sometimes, but other times it gets in the way and makes lines so noisy that you end up needing to split that function call into eight lines just to be able to read it tomorrow.
Re:Remember Smalltalk? (2008) by masklinn on Wednesday February 12, 2014 @03:02PM (#7226898)
Note that Obj-C's APIs tend to be much more verbose than Smalltalk's generally were. Compare Objective-C's

   enumerateObjectsUsingBlock: aBlock
to Smalltalk's

   do: aBlock
or NSDictionary's

    objectForKey: aKey
to Smalltalk's

    at: aKey
Re:Remember Smalltalk? (2008) by chc on Wednesday February 12, 2014 @03:15PM (#7226971)
That's true. I suppose what I was thinking of is more an artifact of Objective-C's quirky typing than a problem with Smalltalk's message syntax.
Re:Remember Smalltalk? (2008) by masklinn on Wednesday February 12, 2014 @03:30PM (#7227047)
There's that, Objective-C's options or errors returning doesn't help, NextStep/Apple seems to be very much in long message names, and some patterns/conventions of Objective-C also factor into it (e.g. `[NSArray arrayWithArray: anArray]`, smalltalk would just say `anArray copy`)
Re:Remember Smalltalk? (2008) by chc on Wednesday February 12, 2014 @04:16PM (#7227387)
True, though [anArray copy] is idiomatic in Objective-C too. It used to be that people would prefer arrayWithArray: because copy returns an owning reference and you'd need a matching release, but now with ARC that isn't really a going concern. I'd feel weird writing [NSArray arrayWithArray:anArray] these days.

I think the majority of Objective-C's verbose conventions are artifacts of the Frankenstein type system — for example, having two methods with the same selector but different signatures will cause any use of either method with an id type to emit warnings, and possibly to generate incorrect code if the types are not compatible. So in order to avoid these awkward situations, Objective-C prefers to be as explicit as possible about what it's getting and giving. (Case in point: The extra verbosity in the examples you gave is almost entirely caused by adding nouns.)