tag:blogger.com,1999:blog-741750605858169835.post1902869797953217563..comments2024-01-24T14:53:02.919+00:00Comments on Stephen Colebourne's blog: Closures - use case - instanceofStephen Colebournehttp://www.blogger.com/profile/01454237967846880639noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-741750605858169835.post-26001150283540448572007-01-05T14:03:14.000+00:002007-01-05T14:03:14.000+00:00Ricky, I agree with your analysis on String/Intege...Ricky, I agree with your analysis on String/Integer not compiling due to generic checks, so thats at least positive.<br /><br />Really, I'm just testing the water here to see if anyone can find more reasons to need the reified type.<br /><br />Oh, and you can only leave casting behind if you follow 'pure-OO' methodologies. Many of use don't ;-)Stephen Colebournenoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-91675237509897122752007-01-03T02:17:51.000+00:002007-01-03T02:17:51.000+00:00I think any hacks to magically add limited reifica...I think any hacks to magically add limited reification should be held off and if reification is deemed to be needed (which this example doesn't prove), then the process would be clean, and wouldn't involve reverting such hacks.<br /><br />Plus, haven't we left casting back in 1.4? I'm doing my best to believe that!Ricky Clarksonhttp://cime.net/~ricky/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-68918502818019570932007-01-03T02:15:15.000+00:002007-01-03T02:15:15.000+00:00"But that is just rubbish, as you could defin..."But that is just rubbish, as you could define a different type as the Class object and get a ClassCastException - ifInstanceOf (String str : obj, Integer.class)"<br /><br />String is not Integer, therefore (String str: whatever) { } is not a {Integer => void}, therefore it won't compile.<br /><br />Apparently I failed to add 0 and 55 correctly. JRoller's captcha tech sucks.Ricky Clarksonhttp://cime.net/~ricky/noreply@blogger.com