Space Ship Operator

This is a pretty neat idea:

http://blogs.msdn.com/abhinaba/archive/2005/10/11/479537.aspx

This gist of the post is that instead of overloading <, <=, ==, !=, >= and > operators you can just overload an <=> operator which will behave similar to what you would do to implement IComparable and the compiler will take care of the rest.

Of course this isn’t implemented in C# or VB currently but it is in Boo!

Drop a brain bomb

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s