|
I (Michal) moved to a new flat, and I had no Internet connection for a week. Which forced me to work on my Master's thesis about type system in Nemerle. Eh... I guess a week more, and it would have been finished :-)
I guess I solved all the problems (in theory, the implementation will be another matter). There are a few new cases it is going to handle. The main advantage is that it will postpone overload resolution for later, if it cannot be solved in the current point. Overloads come from two sources -- overloaded methods and field access. For example the new engine is going to grasp:
as well as:
The current engine chokes on the first example, as when it types fun (x) { x.foo } it doesn't know the type of x (this field can be in several classes, but the current engine doesn't even check that, this has been reported as a bug several times). New engine will leave fun (x) { x.foo } partially typed, and return to it, when the type of x is known.
Second example causes problems, because there are two String.Compare, the second version taking culture argument (which we don't care about). The problem is similar as with the first example -- it does not know which version to use, until after it can see it's used for the List.Sort function, which is too late. The solution is exactly the same.
New algorithm will proceed by collecting typing constraints and trying to solve them. The last part seemed complicated to me, but it turned out to be quite simple (due to a simplistic nature of subtyping in .NET generics).
Now I've got a problem. There is nothing scientifically interesting in this approach. It's too simple. The most important advantage is that a/ it will be implemented, and b/ it will work. But this is no science. What remains is to cite Paul Graham: But for the hackers this label [computer science] is a problem. If what they're doing is called science, it makes them feel they ought to be acting scientific. So instead of doing what they really want to do, which is to design beautiful software, hackers in universities and research labs feel they ought to be writing research papers. I feel there is lots of truth in this essay, but I don't agree with some things there.
From: (220.194.26.10)
We are wellocme to it's configuration.
From: (213.114.21.87)
Wellcome to the real world.
From: (218.28.14.73)
Need to be readed.
From: insurance auto (66.135.34.11)
http://www.insurance-top.com/company/ car site insurance. The autos insurance company, compare car insurance, auto insurance. from website .
From: (82.162.52.181)