James Clark

Results 508 comments of James Clark

``` # Tests whether an array has a member equal to a value. # # + arr - the array in which to search # + val - member to...

I think that's a good addition. One question is can we write the type for this. ``` public isolated function toArray(stream) returns E|T[] = external; ``` Would that work @MaryamZi...

I see no reason why a user needs write ``` public type Z distinct (distinct object { xxx } & distinct object { yyy }) ``` Once you inline X...

I can see two possible, alternative approaches to improving things here: - disallow multiple distinct types within a type declaration that are not indirected through a type reference - instead...

I agree the spec should define this. I think the natural thing to do is to make the member type be the broad type of the expression in the `select`,...

Yes, it should be allowed. The typing should work the same as ``` var y = 50; ``` The spec should be clearer here.

I agree `Foo` is a subtype of `Bar`, but they other way round is not the case. You can't do function subtyping just in terms of sets of values because...

Yes for Case I. No for Case II, because argument subtyping is contravariant i.e. Bar's a subtype of Foo as regards the return type but not as regards the parameter...

Sorry, I thought you meant the other way round. I think you're right that treating Bar as a subtype of Foo would be sound, i.e. if you do things that...