User loginNavigation |
Defining Types not as Classes but as Mathematical SetsHi, long time browser, first time posting. My background is largely in the C family of languages (specifically C, Java, and C#) but I've been reading into dynamic languages and it got me thinking about the advantages of dynamic type systems and bringing some of their advantages into the static world without sacrificing the bonuses static typing brings. An idea popped into my head when I asked what if an object's type and an object's class were different things and variables only refered to the former and were ignorant of the latter? Furthermore what if you viewed a type as a mathematical set of methods defining one method as equal to another method when their names and signatures are the same? For example, in such a system the following Java code wouldn't result in an error.
public class B { // Implicitly defines Type B { int op1(int), int op2(int) } public class C { Essentially you get dynamic type membership and static type capabilities. So I'm pondering: By William Davis at 2007-04-01 23:15 | LtU Forum | previous forum topic | next forum topic | other blogs | 5893 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago