«« Next » « Previous
«« Next » « Previous

Link Details

Woulda, coulda, shoulda! Login and vote now.
Link 77847 thumbnail

By bloid
via freshvanilla.org:8080
Published: Apr 29 2008 / 11:18

While there is no doubt Closures are very powerful concept they are fairly complex to implement properly and efficiently. However, one of the use cases, control block can be simulated using the for each loop without limiting functionality of the blocks involved.
  • 9
  • 1
  • 1051
  • 369

Comments

Add your comment
User 236137 avatar

dzonelurker replied ago:

0 votes Vote down Vote up Reply

"Limitations.

When the loop break unexpectedly, there is no guarentee when, if ever, the iterator will be closed/finalised."

User 179375 avatar

Ricky Clarkson replied ago:

0 votes Vote down Vote up Reply

"While there is no doubt Closures are very powerful concept they are fairly complex to implement properly and efficiently."

A solved problem, circa 1983. Implementing closures is of known complexity. In fact, Java already has an implementation in the compiler, otherwise how would anonymous classes access things from their enclosing scope?
,

User 171944 avatar

b0b0b0b replied ago:

0 votes Vote down Vote up Reply

"I would say the HotSpot JVM is not so complex"

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (1)