Здравствуйте, yumi, Вы писали:
Y> Да какие проблемы, можешь откатить все изменения, ну кроме "closures" в конце
Готово. О запятых:
As you can see, macro code was called during source code compilation and within the compiler process, too
Формально, перед уточняющим too требуется запятая. В художественной литературе, её часто опускают.
But, at the same time, the macro "if" introduces unique syntax.
As you can see, we achieved high declarativity and, at the same time, efficient code.
Вводная фраза "at the same time" выделяется запятыми.
Or, another (functional) method of application:
But, at least the integer constants cannot have null values.
После союза в начале предложения ставится запятая. Конечно, в идеале, предложения с союзов лучше не начинать, но так написано в оригинале.
DR>>Тут добавлено две ошибки.
Y>Какие? Мне просто интересно.
На самом деле, четыре.
• Фраза "the thought ... is to realize" не имеет смысла.
• Во фразе "macros doesn't executes", "macros" множественное число, а "doesn't" и "executes" единственное.
• У "doesn't" и "executes" не согласованы времена.
• Потеряна связь со второй частью предложения: "macros doesn't executes with ... but rather at".
DR>>У меня было написано правильно, а в исправлении ошибка.
Y>Где? Тоже интересно.
Использовано не то время и потеряна связь с остальным предложением: "when this code ran ... the IDE console shows". Плюс, уточнение излишне и расходится с оригиналом.
Ce n'est que pour vous dire ce que je vous dis.
Re[7]: Выложен перевод (на английский) сататьи по макросам
Клево! Слушай, я тут ради прикола начал переводить третью часть, можешь попороть? Ну или если будет полезно, то использовать в переводе третьей части.
Решил прямо тут выложить, тут немного:
Many people mistakenly think that power of macros is in possibility to change program syntax. In my point of view the main power of macros are in possibility to change code semantic despite of beauty and usefulness in some cases of syntax macros.
Meta-attributes are doesn't change the program syntax but they are make possible to get beautiful and effective solutions.
Lots of C# and VB.NET developers are currently using attributes. Attributes is the good way to extend code meta-information (adds to some language constructs such as classes or methods additional information). But we can use that information only at runtime. Of course it has sometimes positive effect but often we want to use this meta-information at compile time.
.NET guru developers have found two solutions to this issue:
1. Dynamic code compilation. There are two ways. First way is to generate source code in some high-level language (for example in C#) then using compilers (or appropriate .NET API which activates them) and following dynamic assembly loading. In such way was implemented XmlSerializer in .NET Framework 1.x. The second way is to use low-level API System.Reflection.Emit (hereinafter referred to as SRE). As example of this way you can see Business Logic Toolkit for .NET (BL Toolkit, www.bltoolkit.net) of Igor Tkachev (known as IT at www.rsdn.ru).
2. Using external code generators which are executes at compile-time while building some assemblies. In this way firstly compiles assembly which contains meta-information after that executes code generator which reads this meta-information using standard API System.Reflection (hereinafter referred to as SR) and generates some code. After that runs compilation of another assembly which contains generated code. Approximately in such manner works improved code generator for XmlSerializer in .NET Framework 2.0.
What advantages and disadvantages do these solutions have? Advantage of second solution is in relatively easy debugging of generated code. Disadvantage is that generating source codes in languages like C# is difficult.
Lisp is not dead. It’s just the URL that has changed: http://clojure.org
Re[5]: Выложен перевод (на английский) сататьи по макросам
Здравствуйте, yumi, Вы писали:
Y>Клево! Слушай, я тут ради прикола начал переводить третью часть, можешь попороть? Ну или если будет полезно, то использовать в переводе третьей части.
За выделенное пороть мало:
Y>Meta-attributes are doesn't change the program syntax but they are make possible to get beautiful and effective solutions.
---
The optimist proclaims that we live in the best of all possible worlds; and the pessimist fears this is true
Re[4]: Выложен перевод (на английский) сататьи по макросам
Здравствуйте, yumi, Вы писали:
VD>>Сначала подредактируем немного... А так, да, надо.
Y>Можешь там страничку для 3й части создать? А то я там не смог, кажется прав не хватает.
Для создания странички нужно просто создать ссвлку на нее и перейти на эту ссылку.
Есть логика намерений и логика обстоятельств, последняя всегда сильнее.
Re[4]: Выложен перевод (на английский) сататьи по макросам
Здравствуйте, VladD2, Вы писали:
VD>Еще одна просьба, если можно. По чисти, плиз, ссылки на русские статьи из журнала если они там остались. А то народ будет в недоумении.
Оставалась одна. Кстати, вики не даёт вставить ссылку на исходный текст MacrosExtendedCourse из за слова sex в названии. :D
Ce n'est que pour vous dire ce que je vous dis.
Re[4]: Выложен перевод (на английский) сататьи по макросам