Control abstraction [Re: Syntax poll, take 2]

Stephen Colebourne scolebourne at joda.org
Tue Jun 14 02:22:44 PDT 2011


On 13 June 2011 21:27, Brian Goetz <brian.goetz at oracle.com> wrote:
>>Ruby allows you to put the lambda as a postfix
>> 'operator' , thus enables you to write:
>>
>> File.list {
>>     | dir, name |
>>     ...
>> }
>>
>> which is _way_ better!
>
> Which brings us full circle to the issue of control abstraction, which
> was a central feature of BGGA.
>
> The status on this:
>  - Completely out of scope for Java 8.  (Don't bother lobbying.)
>  - However, we not hostile to this idea, and (all things being equal)
> it does seem desirable to leave the door open to this in the future, if
> that can be done without sacrificing too much.   (This is a point in
> favor of the BGGA syntax.)

I agree with this approach. It is out of scope. And we shouldn't limit
the ability to add control abstraction in the future.

However, my preference is that control abstraction is though of as a
separate problem in syntax, and potentially a separate problem in
general. When developing FCM/JCA we found that the overlap between the
two did not require a common backend approach (ie. two language
features, not one).

Thus, I would suggest that we do not place any restrictions on the
syntax for lambdas based on a possible control abstraction change.

Stephen


More information about the lambda-dev mailing list