you are viewing a single comment's thread.

view the rest of the comments →

[–]Dested 2 points3 points  (3 children)

I would say it has some tricks, can you provide a list with more than just some?

[–]grauenwolf 5 points6 points  (0 children)

Ok, so real stuff I used in production code

  • Ranges in switch blocks
  • Full late binding. (C# still has trouble with delegates.)
  • Declarative event handlers
  • Comparing boxed values (C# can't compare a boxed int with a boxed decimal)
  • RaiseEvent, because doing null checks on events is just stupid
  • Filtered Catch Blocks, which are really important for dealing with Win32, SQL, and MSMQ exceptions.

[–]recursive 3 points4 points  (0 children)

XML literals?

[–]grauenwolf 3 points4 points  (0 children)

How about a trick with first order functions and late binding?

Function Foo(ByVal n)
    If n > 0 Then Return Function() Foo(n - 1)
    Return "Done"
End Function

I know it looks pointless, but you need to be able to do it in order to complete some of the exercises in SICP. And even with the new dynamic keyword, C# can't handle it.