News for hackers. Stuff that matters.
Re:API changes in Snow Leopard by ben on Friday August 28, 2009 @04:45PM (#792256)
The first thing I wanted to see as a Smalltalker was how much they've baked Blocks into the libraries. I know Cocoa has always had very long method names, but some of these names are wild:

- #enumerateObjectsUsingBlock: is #do:

- #objectsPassingTest: or #indexesOfObjectsPassingTest: are #select:

And so on. Here's what I'm looking at:

http://developer.apple.com/mac/library/documentation/Cocoa/R...

Re:API changes in Snow Leopard by tolmasky on Friday August 28, 2009 @08:40PM (#792577)
The names make perfect sense within the context of the language. Just because you add a new feature to a language doesn't mean you should arbitrarily adopt the naming conventions of its implementation in another language.
Re:API changes in Snow Leopard by masklinn on Friday August 28, 2009 @06:44PM (#792438)
It's nice they retrofit blocks into the lib though, I didn't think they were going to add them beyond GCD.
Re:API changes in Snow Leopard by antonovka on Friday August 28, 2009 @05:23PM (#792315)
The names are silly, and Apple isn't leveraging blocks nearly as much as they could be. The very first thing I did is add an option monad, plus additional collection methods (including the nice and short map and filter) via categories.

My only complaint is that The [[]] messaging syntax gets way too verbose when chaining together sequence comprehensions.

Re:API changes in Snow Leopard by albertcardona on Saturday August 29, 2009 @05:49AM (#793021)
I call it "ctrl+space semantically-aware word completion" and "self-documenting function names."

Nothing unusual in multi-year multi-programmer software.

As much as I like succinct function names, in my experience they don't work when there's more than one hacker involved. A strategy I have followed is to make long names for the top-level, interface-like functions, and succinct ones for all the internals; i.e. put the verbosity where others need to look up code to use it as a library, where "library" is understood as an individual/indepenent component of a larger software project.