public class foo{ public this()=>void{ print "foo!"; }}public static main()=>void{ local foo aFoo = new foo; aFoo();}
And it's used for the normal sort of functor stuff that C++ uses it for.
What I implemented today was a similar beast for properties:
public class intProperty{ private int x; public int this{ get{ return(x); } set{ x = value; } }}public static main()=>void{ local intProperty x = new intProperty; x = 5; print x;}
Not very thrilling. Eventually though, I want to use this mechanism to create stuff like reusable properties that have an event that is triggered when the setter is called. It'll also be used for things often relegated to implicit conversions.
I need to figure out a good way to allow the programmer to disambiguate member access on the property rather than it's value member access, but that's not a huge priority. I don't expect that scenario to arise often.