Re: Anonymous class - I don't know how to...



Twisted wrote:

In practise, I expect the requirement for "final" on the local
variables may be quietly dropped and nothing will be done to support
returning from enclosing contexts, though it could be done, as it just
isn't very useful in typical Java programming (to the point that I've
never used it aside from as proof-of-concept).

If closures could support abstraction like the for loop, early exits should be common. Think how you would normally implement a 'find first'.

OTOH, if closures are supposed to abstract control flow away, then the early exits should be moved to the 'algorithm method' and not in the closure.

Tom Hawtin
.



Relevant Pages

  • Re: My .NET service dows not stop in a controlled way
    ... You wrote that my process shall exits it self. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ... handled working with a dedicated Microsoft Support Engineer by contacting ...
    (microsoft.public.dotnet.framework)
  • Re: Function minimization and random numbers
    ... lacks closures. ... anonymous functions to delegates. ... There is no loss of static type safety. ... Are you claiming that the C# support for closures is useless? ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: dynamic LPA
    ... Even before I left ASG TMONMVS used supported interfaces for DYNAMIC LPA ... It has support to update the SVC table, ... SMF exits, RACF exits and others while doing the load. ...
    (bit.listserv.ibm-main)
  • Re: Function minimization and random numbers
    ... Well, .NET's type system makes the distinction, allowing conversions ... Groovy supports overloaded method groups as closures, ... Consider a language that support integers but imposes a compile time ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Function minimization and random numbers
    ... Well, .NET's type system makes the distinction, allowing conversions ... lacks closures. ... design but it culminated in F# rather than delegates. ... Are you claiming that the C# support for closures is useless? ...
    (microsoft.public.dotnet.languages.csharp)