#1198 'Type' syntax propose

go4 Mon 6 Sep 2010

Date#.make will call the Date's constructor make/static make/defVal ,but not Type's constructor. Uri#.method("fromStr").call("as/ad") is well,but Uri#->fromStr("as/ad") is error.

So I think the # is not necessary for className,we like Uri.isMixin than Uri#.isMixin, a such as Type t:= Uri / Float.fits(Float)

no # the class is more like a instance of type

For the type casting,we can using: ((Int)obj).abs / (obj as Int).abs / obj.as(Int).abs I like last one.I don't like create key word for API. I suggest using obj.is() / obj.as().In fact fits is key word also is the method of Type

Login or Signup to reply.