closures after all?
tim at peierls.net
Fri Nov 20 21:24:04 PST 2009
On Fri, Nov 20, 2009 at 7:50 PM, Neal Gafter <neal at gafter.com> wrote:
> It has always been the case that public APIs are best designed by experts.
> A small percentage of Java developers have the skills to do a good job
> here. The addition of function types wouldn't change that.
The addition of function types would raise the threshold of expertise
required to do a good job, making that small percentage even smaller.
Would the increased difficulty of good API design (and decreased usability
due to bad API design) be adequately balanced by the gain in expressive
power? I'm not totally convinced either way, which is why the caution being
shown so far seems appropriate to me, frustrating as it must be for those
who are convinced the answer is "yes".
> There are APIs for which named interfaces would be an unwise API design
> choice, ParallelArray being the most obvious example. As a practical
> matter, only allowing named function types results in APIs such as this
> being simply impractical in Java.
I wish people wouldn't pick on ParallelArray. There might be cases where
named function types are impractical, but the experiments I've made with
ParallelArray (admittedly just for fun) seem more readable and maintainable
to me than any of the more concise forms under discussion would be. They're
longer, yes, but the names convey helpful information.
> With great power comes great responsibility.
More information about the coin-dev