tag:blogger.com,1999:blog-8678405.post2861613718213893583..comments2023-09-02T15:54:52.482+01:00Comments on Ricky's technical blog: Closures without instances, and safer non-local returnsRicky Clarksonhttp://www.blogger.com/profile/13845104548520132930noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8678405.post-74909683408172095612007-01-29T18:45:00.000+00:002007-01-29T18:45:00.000+00:00This comment has been removed by a blog administrator.Zunasterhttps://www.blogger.com/profile/12394770072382472290noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-82677847058438595952007-01-17T13:22:00.000+00:002007-01-17T13:22:00.000+00:00Stephen (Colebourne?),
You're right, because of J...Stephen (Colebourne?),<br /><br />You're right, because of Java's exception syntax, it would end up that way, but that's a good thing. Non-local transfers in closures that are not guaranteed (restricted) to run synchronously are predictable failures.<br /><br />I outlined a way of handling it centrally anyway, allowUnsafeReturns.<br /><br />I know where Neal is coming from about Hotspot, short-lived instances are extremely cheap, including short-lived exceptions.<br /><br />But then, his solution doesn't actually <b>allow</b> javac to make the optimisation of removing the instance.Ricky Clarksonhttps://www.blogger.com/profile/13845104548520132930noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-56782135940155653662007-01-16T12:38:00.000+00:002007-01-16T12:38:00.000+00:00The checked exception is quite clever, it just doe...The checked exception is quite clever, it just doesn't feel quite right. Surely it would essentially mean that no-one uses that construct?<br /><br />Closures without instances is where I started on this many moons ago. When I spoke to the guys at Javapolis, they preferred to use hotspot to deal with this.Stephen Colebournehttps://www.blogger.com/profile/01454237967846880639noreply@blogger.com