Re: класс + пространство имен Nemerle vs. C#
От: Аноним  
Дата: 13.03.13 12:31
Оценка:
Здравствуйте, _NN_, Вы писали:

_NN>Итак C# запрещает (может кто знает почему ?) иметь класс и пространство имен с тем же именем


Не поэтому?

This reveals an interesting point about the design of the “type binding” algorithm in C#. That is, the algorithm which determines what type or namespace a name like “X.Y” is talking about. We do not “backtrack”. We do not say “well, suppose X means this. Then Y would have no meaning. Let’s backtrack; suppose X means this other thing, oh, yes, then Y has a meaning.” We figure out what X unambiguously means, and only then do we figure out what Y means. If X is ambiguous, we don’t check all the possibilities to see if any of them has a Y, we just give up.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.