John:

The use case is writing your own language features.

Imagine we had a long return closure system.

Then 'foreach' is utterly unneccessary. You could just write it as a
library. Same story for ARM-like proposals (File.doForEachLine),
functional style collections operations, such as filter, flatten, and
map, map foreach, a synchronized-like block construct for semaphores
and locks, and whatever else you can think up. Anytime you use a
closure to represent the body of such a 'statement', obviously the
return, continue, and break statements have to be transparent or it's
a very leaky abstraction.

It has nothing to do with tail recursion.

On Jan 15, 6:41 pm, "John Nilsson" <j...@milsson.nu> wrote:
> Actually, what is the use case for long returns? What would you like to do
> with it?
>
> The examples I can come up with is better solved with tail recursion...
>
> BR,
> John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to