User loginNavigation 
Languages With Some Form of Implicit SubtypingHello all. Caveat: I would have just searched on google et al, but I am not sure that I have the terminology correct. I think that I am looking for implicit structural subtyping. Essentially, I am looking for a language that would allow something like this: fun f o = o.ToString() fun test o1 o2 = let l = [s1, s2] in Note that this should be statically typechecked. Essentially, I am looking for something with a type system similar to O'Caml's object system with row variables, but allowing for the line [s1, s2] without use of the operator :> (or whatever it is) to explicitly state some subtype relationship. That is, l' would have the type of a list of objects implementing ToInt(), where ToInt() has type () > '_a, that is, ToInt() takes unit and returns some type not yet determined, but that will be. A key aspect that I am looking for is broad use of inference so that one doesn't have to explicitly annotate subtyping relationships, at least not often. If you can think of languages with similar type systems, I would appreciate it. If you could note the differences or constraints as well, that would be great! Just a note, I am not looking for a language to use, nor one with precisely the above semantics and syntax. I am mostly just interested in the theory behind such kinds of type checking. I hope that I got the name right, but pointers to other keywords to search on would help, too. Thanks, sorry if this is not the right forum for such a post. By zrxer at 20061012 21:07  LtU Forum  previous forum topic  next forum topic  other blogs  4897 reads

Browse archivesActive forum topics 
Recent comments
1 week 3 days ago
1 week 3 days ago
1 week 3 days ago
2 weeks 1 hour ago
2 weeks 1 day ago
2 weeks 1 day ago
2 weeks 2 days ago
2 weeks 2 days ago
2 weeks 3 days ago
2 weeks 3 days ago