{"id":277967,"date":"2016-04-09T14:55:03","date_gmt":"2016-04-09T10:55:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277967"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277967","title":{"rendered":"The dangers of not looking ahead"},"content":{"rendered":"<p>       \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, dynamic \u0432 C# \u2014 \u043f\u0440\u043e\u0441\u0442\u043e object \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435\u0440\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041d\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c.<\/p>\n<p>  \u042f\u0434\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f DLR (Dynamic Language Runtime) \u2014 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430\/\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e C#, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0435\u0442 \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0435 \u0441 .NET \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u044f Iron-\u044f\u0437\u044b\u043a\u043e\u0432.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 (generics), \u0442\u043e CLR \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043d\u044b\u0445. \u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 CLR+DLR \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 generics \u0432\u043c\u0435\u0441\u0442\u0435, <b>\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/b> \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c <b>\u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c<\/b>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3><font color=\"#2E74B5\">Preamble<\/font><\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u044f CLR&#8217;\u043e\u043c.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 generic-\u0442\u0438\u043f \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0442.\u0435. <b>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442<\/b> type-erasure. \u041d\u043e \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0441\u0440\u0435\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0438\u043f System.__Canon \u0434\u043b\u044f \u0448\u0430\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437-\u0437\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438 (\u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e), \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0442\u0438\u043f\u0430\u043c\u0438.<\/p>\n<p>  \u041e\u0431 \u044d\u0442\u043e\u043c \u044f \u0443\u0436\u0435 <a href=\"https:\/\/habrahabr.ru\/post\/253105\/\">\u043f\u0438\u0441\u0430\u043b<\/a>:  <\/p>\n<blockquote><p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e generic-\u0442\u0438\u043f\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432, \u0447\u0442\u043e \u0447\u0440\u0435\u0432\u0430\u0442\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u043e\u0434\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Generics cyclomatic dependencies<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">class GenericClassOne&lt;T&gt; {     private T field; }  class GenericClassTwo&lt;U&gt; {     private GenericClassThree&lt;GenericClassOne&lt;U&gt;&gt; field }  class GenericClassThree&lt;S&gt; {     private GenericClassTwo&lt;GenericClassOne&lt;S&gt;&gt; field } class Program {     static void Main(string[] args)     {         Console.WriteLine((new GenericClassTwo&lt;object&gt;()).ToString());         Console.Read();     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u0443\u043f\u0430\u0434\u0435\u0442 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 <b>GenericClassTwo`1[System.Object]<\/b>.<\/p>\n<p>  <b>Type loader<\/b> (\u043e\u043d \u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0442\u0438\u043f\u043e\u0432) \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 generic-\u0442\u0438\u043f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0441\u0442\u044c (\u0442.\u043d. LoadLevel \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430). \u0425\u043e\u0442\u044f \u0432\u0441\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f ref-types \u0438\u043c\u0435\u044e\u0442 System.__Canon \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0442\u0438\u043f\u0430 \u2014 \u044d\u0442\u043e \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0430 \u043d\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0430.<\/p>\n<p>  \u0424\u0430\u0437\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (\u043e\u043d\u0438 \u0436\u0435 ClassLoadLevel):<\/p>\n<pre><code class=\"cpp\">enum ClassLoadLevel {     CLASS_LOAD_BEGIN,     CLASS_LOAD_UNRESTOREDTYPEKEY,     CLASS_LOAD_UNRESTORED,       CLASS_LOAD_APPROXPARENTS,     CLASS_LOAD_EXACTPARENTS,     CLASS_DEPENDENCIES_LOADED,     CLASS_LOADED,     CLASS_LOAD_LEVEL_FINAL = CLASS_LOADED, }; <\/code><\/pre>\n<p>  <\/p><\/blockquote>\n<p>  <\/p>\n<h3><font color=\"#2E74B5\">Infinite loop<\/font><\/h3>\n<p>  \u0420\u0430\u0437 \u0442\u0430\u043a\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0434\u0440. \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u0443. \u041d\u043e DLR \u2014 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432:<br \/>  <b><i>NB<\/i><\/b>: \u043a\u043e\u0434 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u2014 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"http:\/\/structuremap.github.io\/\">structuremap<\/a>, \u0445\u043e\u0442\u044c \u0438 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u0432\u0448\u0438\u0439 \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0435\u0433\u043e <a href=\"http:\/\/msk2014.dotnext.ru\/\">\u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f<\/a> \u00ab\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DLR\u00bb.<\/p>\n<pre><code>public class LambdaInstance&lt;T&gt; : LambdaInstance&lt;T, T&gt; { }  public class LambdaInstance&lt;T, TPluginType&gt;      : ExpressedInstance&lt;LambdaInstance&lt;T, TPluginType&gt;, T, TPluginType&gt; { }  public abstract class ExpressedInstance&lt;T&gt; { }  public abstract class ExpressedInstance&lt;T, TReturned, TPluginType&gt; : ExpressedInstance&lt;T&gt; { } <\/code><\/pre>\n<p>  \u0418 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434:<\/p>\n<pre><code>class Program {     static LambdaInstance&lt;object&gt; ShouldThrowException(object argument)     {         throw new NotImplementedException();     }      static void Main(string[] args)     {         \/\/ \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435?         ShouldThrowException((dynamic)new object());     } } <\/code><\/pre>\n<p>  \u0412\u043e\u043f\u0440\u043e\u0441: <u>\u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/u>?<br \/>  \u041e\u0442\u0432\u0435\u0442: <b>\u043d\u0435\u0442<\/b>. \u041c\u0435\u0442\u043e\u0434 ShouldThrowException \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f. \u0418 stackoverflow (<s>\u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442<\/s>) \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442.<\/p>\n<p>  \u0425\u043c\u2026 \u0422\u0430\u043a \u0432 \u0447\u0435\u043c \u0436\u0435 \u0434\u0435\u043b\u043e? \u2014 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0412\u044b.<br \/>  \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 <b>LambdaInstance&#038;ltobject&#038;gt<\/b>. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0435\u0449\u0435 \u0440\u0430\u0437.<\/p>\n<p>  LambdaInstance&#038;ltT&#038;gt \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 <b>LambdaInstance&#038;ltT, TPluginType&#038;gt<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0442 ExpressedInstance&#038;lt<b>LambdaInstance&#038;ltT, TPluginType&#038;gt<\/b>, T, TPluginType&#038;gt. <\/p>\n<p>  \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438?<\/p>\n<p>  \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, CLR \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>ShouldThrowException((dynamic)new object());<\/code> DLR \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0438\u043d\u0441\u043f\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430\/\u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 \u043c\u0435\u0442\u043e\u0434\u0430. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f LambdaInstance&#038;ltobject&#038;gt \u0438 \u043a\u043e\u0434 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b.<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u043a\u0440\u0435\u0448\u0438\u0442\u0441\u044f? DLR \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0441\u0442\u0435\u0442 (\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043f. \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435), \u043d\u043e <b>\u043d\u0435<\/b> \u0441\u0438\u043b\u044c\u043d\u043e.<\/p>\n<h3><font color=\"#2E74B5\">Epilog<\/font><\/h3>\n<p>  \u041c\u043e\u0436\u0435\u0442 <a href=\"https:\/\/habrahabr.ru\/post\/280234\/\">\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f<\/a>, \u0447\u0442\u043e dynamic \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0449\u044c\u044e \u043e\u043f\u0430\u0441\u043d\u043e\u0439. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0434\u0435 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.                 <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/281274\/\"> https:\/\/habrahabr.ru\/post\/281274\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, dynamic \u0432 C# \u2014 \u043f\u0440\u043e\u0441\u0442\u043e object \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435\u0440\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041d\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c.<\/p>\n<p>  \u042f\u0434\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f DLR (Dynamic Language Runtime) \u2014 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430\/\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e C#, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0435\u0442 \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0435 \u0441 .NET \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u044f Iron-\u044f\u0437\u044b\u043a\u043e\u0432.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 (generics), \u0442\u043e CLR \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043d\u044b\u0445. \u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 CLR+DLR \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 generics \u0432\u043c\u0435\u0441\u0442\u0435, <b>\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/b> \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c <b>\u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c<\/b>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-277967","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=277967"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277967\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}