{"id":261313,"date":"2015-07-13T18:20:01","date_gmt":"2015-07-13T14:20:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=261313"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=261313","title":{"rendered":"\u0412\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u0421 \u0438\u043b\u0438 \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e Cello"},"content":{"rendered":"<p>     \t<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b97\/766\/d83\/b97766d83a7122492e5d1c2a76a2bfe2.png\" alt=\"image\" align=\"left\"\/><a href=\"http:\/\/libcello.org\/\">Cello<\/a> \u2014\u00a0\u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 C \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c! \u041e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u044f (generics), \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b\/\u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b, \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 (\u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e), \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u0444\u043b\u0435\u043a\u0446\u0438\u044f. \u0414\u0430-\u0434\u0430, \u0442\u044b \u043d\u0435 \u043e\u0441\u043b\u044b\u0448\u0430\u043b\u0441\u044f, \u0432\u0441\u0435 \u044d\u0442\u0438 \u043f\u043b\u044e\u0445\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u043b\u0430\u043a\u043e\u043d\u0435. \u0422\u0430\u043a \u043a\u0430\u043a Cello \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0421, \u0432 \u0441\u0443\u0445\u043e\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u0435 \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0448\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0436\u0438\u0432\u043e\u043c\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043d\u0430 \u0437\u0435\u043c\u043b\u0435: \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0438 \u0433\u0438\u0431\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>  Talk is cheap, show me the code!<\/p>\n<pre><code class=\"cpp\">#include &quot;Cello.h&quot;  int main(int argc, char** argv) {    \/* Stack objects are created using &quot;$&quot; *\/   var i0 = $(Int, 5);   var i2 = $(Int, 3);   var i2 = $(Int, 4);    \/* Heap objects are created using &quot;new&quot; *\/   var items = new(Array, Int, i0, i1, i2);    \/* Collections can be looped over *\/   foreach (item in items) {     print(&quot;Object %$ is of type %$\\n&quot;,       item, type_of(item));   }    \/* Heap objects destructed via Garbage Collection *\/   return 0; } <\/code><\/pre>\n<p>  \u0428\u041e\u041a! \u0417\u0430\u0447\u0435\u043c \u0436\u0435 \u043c\u043d\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u0430\u0448\u0438 Go\/D\/Nim\/&lt;\u0432\u043f\u0438\u0448\u0438&gt;, \u0435\u0441\u043b\u0438 \u0421 \u043d\u0430 \u0441\u0442\u0435\u0440\u043e\u0438\u0434\u0430\u0445 \u0440\u0435\u0448\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0440\u043e\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e?! \u0425\u043e\u0447\u0435\u0448\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 Cello \u043a \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0443 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c <b>\u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430<\/b>? \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0412\u0432\u043e\u0434\u043d\u0430\u044f<\/h4>\n<p>  Cello \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0421 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430. \u042d\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043d\u0430\u0447\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u044f\u0437\u044b\u043a \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043d\u044f\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0430 \u0442\u0430\u043a\u0443\u044e \u0440\u043e\u0441\u043a\u043e\u0448\u044c \u043c\u044b \u0441\u0435\u0431\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u043c. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 <i>\u0442\u0438\u043f\u043e\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/i> (runtime type variables), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044f \u0438\u0445 \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438.<\/p>\n<p>  \u041e\u0432\u0435\u0440\u0445\u0435\u0434 \u0443 GC \u0432 Cello \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0435\u0441\u0442\u044c. \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432 Cello \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u043f\u0435\u0440\u0435\u0434 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432 Cello \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u0440\u0430\u0431\u043e\u0447\u0435-\u043a\u0440\u0435\u0441\u0442\u044c\u044f\u043d\u0441\u043a\u0438\u043c\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438\u0437 \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043a\u043e\u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0412\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0438\u043f\u0430\u0445 \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043c\u0435\u0440\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 <i>\u0442\u0438\u043f\u043e\u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/i> \u0438 <i>\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/i>. \u042d\u0442\u0438 \u0440\u0435\u0431\u044f\u0442\u0430 \u0441\u0435\u0431\u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0435\u0437\u0434\u0435: \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 GC, \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0438\u0445 <i>\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/i>. \u042d\u0442\u043e \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0432 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u043d\u0435\u0440\u0435, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0432\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  Cello, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u043c\u0435\u043d \u0438 \u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f (behaviours) \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u041e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 Cello \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c, \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u043e\u0442 \u044d\u0442\u043e \u0432\u0441\u0435. \u041a\u043e\u0440\u043e\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0440\u0430\u0439\u0441\u043a\u043e\u0435 \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u041e\u0431\u044a\u0435\u043a\u0442\u044b<\/h4>\n<p>  \u041e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 Cello \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0447\u0435-\u043a\u0440\u0435\u0441\u0442\u044c\u044f\u043d\u0441\u043a\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u044b \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u0435\u0448\u044c \u0438\u0437 \u0421. \u0427\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 Cello \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u0432 \u043d\u0438\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0443\u0436\u043d\u043e <b>\u0431\u0435\u0437<\/b> <code>typedef<\/code>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0434\u0430 \u043d\u0430 \u0441\u0442\u0435\u0440\u043e\u0438\u0434\u0430\u0445! \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0438\u0448\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <code>Cello<\/code>:<\/p>\n<pre><code class=\"cpp\">struct Image {   uint64_t width;   uint64_t height;   unsigned char *data; };  var Image = Cello(Image); <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0435 \u0448\u0442\u0443\u043a\u0438. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u0448\u043d\u044b\u0439 \u0442\u0438\u043f <code>Image<\/code> \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0438\u043f \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435. \u041f\u043e \u0432\u043e\u043b\u0435 \u0441\u043b\u0443\u0447\u0430\u044f, \u043c\u044b \u0442\u043e\u0436\u0435 \u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043b\u0438 <code>Image<\/code>. \u0422\u044b \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0430 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <code>var<\/code>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 <code>var<\/code> \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c <code>void*<\/code>, \u0442\u043e\u0435\u0441\u0442\u044c <i>\u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c<\/i>, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u044d\u0442\u043e \u0432\u0441\u0435. \u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c, \u0437\u0430 \u0442\u0435\u0431\u044f \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u0430 <code>Image<\/code>: \u0447\u0442\u043e \u043d\u0430 \u0441\u0442\u044d\u043a\u0435, \u0447\u0442\u043e \u043d\u0430 \u043a\u0443\u0447\u0435. \u041f\u043e\u043c\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c, \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c, \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0438 \u0432\u043e\u0442 \u044d\u0442\u043e \u0432\u0441\u0435:<\/p>\n<pre><code class=\"cpp\">\/* Allocate on Stack or Heap *\/ struct Image* x = $(Image, 0, 0, NULL); struct Image* y = new(Image);  \/* Print *\/ print(&quot;This is an image: %$\\n&quot;, x);  \/* Compare *\/ print(&quot;Images %$ and %$ are equal? %s\\n&quot;,    x, y, eq(x, y) ? $S(&quot;Yes&quot;) : $S(&quot;No&quot;));  \/* Put in an Array *\/ struct Array* a = new(Array, Image, x, y); print(&quot;Array of Images: %$\\n&quot;, a); <\/code><\/pre>\n<p>  \u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u043e\u043a\u043b\u0430\u0441\u0441\u044b \u0432 Cello, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041d\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0441\u0438\u043b\u0430 Cello \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u0438\u0445 \u0442\u0438\u043f\u043e\u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<h4>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b<\/h4>\n<p>  \u041d\u0430\u0448\u0430 \u0441\u0438\u0448\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, <code>Image<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439. \u0415\u0441\u043b\u0438 \u0442\u044b \u0445\u043e\u0447\u0435\u0448\u044c \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0443\u0442\u0435\u0447\u0435\u043a, \u043d\u0430\u0434\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u044d\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f Cello, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0434\u043b\u044f <code>Image<\/code>:<\/p>\n<pre><code class=\"cpp\">void Image_Del(var self) {   struct Image* i = self;   free(i-&gt;data); } <\/code><\/pre>\n<p>  \u0422\u044b \u043c\u043e\u0436\u0435\u0448\u044c \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>self<\/code> \u043a \u0441\u0438\u0448\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 <code>Image*<\/code>. \u042d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 Cello (\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441 <code>var<\/code>) \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u0440\u0430\u0431\u043e\u0447\u0435-\u043a\u0440\u0435\u0441\u0442\u044c\u044f\u043d\u0441\u043a\u0438\u043c\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0432 \u0421. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u0442\u0435\u0431\u044f \u0435\u0441\u0442\u044c <code>var<\/code>-\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0437 Cello, \u0442\u044b \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u043d\u0430 \u043d\u0435\u043c \u0432\u0438\u0441\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0448\u043d\u044b\u0439 \u0442\u0438\u043f (\u043f\u0440\u044f\u043c\u043e \u043a\u0430\u043a \u0437\u0434\u0435\u0441\u044c, \u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435), \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u043a \u044d\u0442\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u0438 \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u044f\u043c \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u0412 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>free<\/code> \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 <code>Image<\/code>.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0432 Cello, \u0442\u044b \u0437\u0430\u0445\u043e\u0447\u0435\u0448\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043c\u0430\u043a\u0440\u043e\u0441 <code>Cello<\/code>, \u043a\u0430\u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>Instance<\/code> \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u043e\u043a\u043b\u0430\u0441\u0441\u0430 <code>New<\/code>. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c <code>NULL<\/code> \u0432 \u0441\u043e\u043e\u0442\u0432. \u043f\u043e\u043b\u0435:<\/p>\n<pre><code class=\"cpp\">var Image = Cello(Image, Instance(New, NULL, Image_Del)); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 GC \u0432 Cello \u043f\u0440\u0438\u0434\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <code>Image<\/code>, \u043e\u043d \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043d\u0430\u0448 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440. \u0410 \u0447\u0435\u0433\u043e, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u043a\u0440\u0443\u0442\u043e!<\/p>\n<h4>C\u0430\u0445\u0430\u0440, \u0441\u0430\u0445\u0430\u0440, \u0441\u0430\u0445\u0430\u0440<\/h4>\n<p>  Daniel Holden \u043d\u0430\u043f\u0438\u0441\u0430\u043b Cello, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443, \u0442\u0430\u043a \u0447\u0442\u043e \u0442\u0443\u0442 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0441\u0430\u0445\u0430\u0440\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (sic!):<\/p>\n<pre><code class=\"cpp\">#include &quot;Cello.h&quot;  int main(int argc, char** argv) {    \/* Shorthand $ can be used for basic types *\/   var prices = new(Table, String, Int);   set(prices, $S(&quot;Apple&quot;),  $I(12));    set(prices, $S(&quot;Banana&quot;), $I( 6));    set(prices, $S(&quot;Pear&quot;),   $I(55));    \/* Tables also support iteration *\/   foreach (key in prices) {     var val = get(prices, key);     print(&quot;Price of %$ is %$\\n&quot;, key, val);   }    return 0; } <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u0437\u0430\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u0442\u044b\u0435 range-\u0446\u0438\u043a\u043b\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0441\u043b\u0430\u0439\u0441\u044b:<\/p>\n<pre><code class=\"cpp\">#include &quot;Cello.h&quot;  int main(int argc, char** argv) {    var items = new(Array, Int,      $I( 8), $I( 5), $I(20),      $I(15), $I(16), $I(98));    \/* Iterate over indices using &quot;range&quot; *\/   foreach (i in range($I(len(items)))) {     print(&quot;Item Range %i is %i\\n&quot;, i, get(items, i));   }    \/* Iterate over every other item with &quot;slice&quot; *\/    foreach (item in slice(items, _, _, $I(2))) {     print(&quot;Item Slice %i\\n&quot;, item);   }    return 0; } <\/code><\/pre>\n<h4>\u0418 \u044d\u0442\u043e \u0435\u0449\u0435 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435&#8230;<\/h4>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Cello \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043c\u043d\u043e\u044e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0431\u0435\u0434\u0430, \u0432\u0435\u0434\u044c \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0448\u0442\u0443\u043a\u0430\u043c\u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/libcello.org\/learn\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u0443 Cello \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0439 <a href=\"http:\/\/libcello.org\/learn\/quickstart\">Quickstart<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u0432\u0442\u043e\u0440 \u043f\u043e\u043a\u0430\u0436\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0433\u043b\u0438\u0442\u0447\u0443\u0435\u0442 .tga-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f!<\/p>\n<p>  \u041e\u0442\u0432\u0435\u0447\u0430\u044f \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u0433\u043e\u0442\u043e\u0432 \u043b\u0438 Cello \u043a \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0443\u2026 \u0442\u0443\u0442 \u043d\u0435\u0442 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430. \u0421\u0438, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u0430 \u043f\u0440\u044f\u043c\u043e \u0442\u0430\u043a\u0438 maxxx\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u0417\u0430\u0445\u043e\u0442\u044f\u0442 \u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0441\u043e\u0444\u0442\u0430 \u0442\u044f\u043d\u0443\u0442\u044c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 GC \u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043f\u043e\u0440\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438 \u044f \u0441\u043a\u043b\u043e\u043d\u0435\u043d \u043a \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u0443. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043d\u0430\u0434 Cello \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u044d\u0442\u043e \u0448\u0442\u0443\u043a\u0430 \u0440\u0430\u0431\u043e\u0447\u0430\u044f. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0444\u0443\u043b\u043b\u0442\u0430\u0439\u043c \u0421-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0446\u0435\u043d\u0438\u0442\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u044d\u0442\u0430 \u0448\u043d\u044f\u0448\u043a\u0430 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438, \u0441\u0441\u044b\u043b\u043e\u0447\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/orangeduck\/Cello\">\u0433\u0438\u0442\u0445\u0430\u0431<\/a>. \u041f\u043e\u043c\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u044f \u0442\u0430\u043a\u0436\u0435 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u0442\u0435\u043c\u0435 \u043f\u043e\u0441\u0442\u0430. \u041f\u0440\u043e\u0448\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u044f\u0437\u044b\u043a\u043e\u043c \u0421, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0447\u0443 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f.   \t\t\t\t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">C\u0442\u0430\u043d\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cello?<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"262471\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"13791\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv67939\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"67939\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv67939\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e, \u0434\u0430!<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv67941\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"67941\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv67941\">\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435\u0442!<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv67943\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"67943\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv67943\">\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u044e \u0432 \u0435\u0433\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c\u2026<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv67945\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"67945\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv67945\">\u0412\u0440\u0435\u0436\u0443 \u0442\u0438\u043c\u043b\u0438\u0434\u0443 \u0441\u043a\u043e\u0432\u043e\u0440\u043e\u0434\u043e\u0439 \u043f\u043e \u0433\u043e\u043b\u043e\u0432\u0435 \u0438 \u043f\u0443\u0449\u0443 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv67947\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"67947\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv67947\">\u042d\u0442\u043e\u0442 \u0447\u0443\u0432\u0430\u043a \u0441\u043b\u043e\u043c\u0430\u043b \u043d\u0430\u0448 \u0421!!! \u0411\u0435\u0439 \u0435\u0433\u043e!!!<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"total\">\u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b 1 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"https:\/\/habrahabr.ru\/auth\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<\/p><\/div>\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=\"http:\/\/habrahabr.ru\/post\/262471\/\"> http:\/\/habrahabr.ru\/post\/262471\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b97\/766\/d83\/b97766d83a7122492e5d1c2a76a2bfe2.png\" alt=\"image\" align=\"left\"\/><a href=\"http:\/\/libcello.org\/\">Cello<\/a> \u2014\u00a0\u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 C \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c! \u041e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u044f (generics), \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b\/\u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b, \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 (\u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e), \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u0444\u043b\u0435\u043a\u0446\u0438\u044f. \u0414\u0430-\u0434\u0430, \u0442\u044b \u043d\u0435 \u043e\u0441\u043b\u044b\u0448\u0430\u043b\u0441\u044f, \u0432\u0441\u0435 \u044d\u0442\u0438 \u043f\u043b\u044e\u0445\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u043b\u0430\u043a\u043e\u043d\u0435. \u0422\u0430\u043a \u043a\u0430\u043a Cello \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0421, \u0432 \u0441\u0443\u0445\u043e\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u0435 \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0448\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0436\u0438\u0432\u043e\u043c\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043d\u0430 \u0437\u0435\u043c\u043b\u0435: \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0438 \u0433\u0438\u0431\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>  Talk is cheap, show me the code!<\/p>\n<pre><code class=\"cpp\">#include &quot;Cello.h&quot;  int main(int argc, char** argv) {    \/* Stack objects are created using &quot;$&quot; *\/   var i0 = $(Int, 5);   var i2 = $(Int, 3);   var i2 = $(Int, 4);    \/* Heap objects are created using &quot;new&quot; *\/   var items = new(Array, Int, i0, i1, i2);    \/* Collections can be looped over *\/   foreach (item in items) {     print(&quot;Object %$ is of type %$\\n&quot;,       item, type_of(item));   }    \/* Heap objects destructed via Garbage Collection *\/   return 0; } <\/code><\/pre>\n<p>  \u0428\u041e\u041a! \u0417\u0430\u0447\u0435\u043c \u0436\u0435 \u043c\u043d\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u0430\u0448\u0438 Go\/D\/Nim\/&lt;\u0432\u043f\u0438\u0448\u0438&gt;, \u0435\u0441\u043b\u0438 \u0421 \u043d\u0430 \u0441\u0442\u0435\u0440\u043e\u0438\u0434\u0430\u0445 \u0440\u0435\u0448\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0440\u043e\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e?! \u0425\u043e\u0447\u0435\u0448\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 Cello \u043a \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0443 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c <b>\u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430<\/b>? \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u0430\u0442.  <\/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-261313","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261313","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=261313"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261313\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=261313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=261313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=261313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}