A leisurely read through ECMAScript v4
Tuesday, March 4th, 2008“like”
The special type operator like is used to test whether an object “looks like” a particular type even without being of that type. For example,
var v: like { x: int, y: int }
will accept both of these values:
{ x:3, y:3 } : Point
{ x:3, y:3 }
Advice to language designers: If you ever get to the point where it feels logical and appropriate to add a language feature such as like, please, just give up.
The future will thank you.
Plenty more from where that came from.