<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Синтаксис on TrustLang</title>
		<link>https://trust-lang.net/en/docs/syntax/</link>
		<description>Recent content in Синтаксис on TrustLang</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<atom:link href="https://trust-lang.net/en/docs/syntax/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Naming Objects</title>
				<link>https://trust-lang.net/en/docs/syntax/naming/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/naming/</guid>
				<description>&lt;p&gt;Objects and data types can be named using letters, numbers, and underscores in any combination, provided that the first character of the name is not a digit.&lt;/p&gt;&#xA;&lt;p&gt;All identifiers must be unique, and to avoid collisions, you can use &lt;a href=&#34;https://trust-lang.net/en/docs/syntax/namespace/&#34;&gt;namespaces&lt;/a&gt; and a &lt;a href=&#34;https://trust-lang.net/en/docs/syntax/modules/&#34;&gt;modular code structure&lt;/a&gt; supported simultaneously by &lt;em&gt;TrustLang&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Overloading &lt;a href=&#34;https://trust-lang.net/en/docs/types/funcs/&#34;&gt;functions&lt;/a&gt; based on argument types is absent in &lt;em&gt;TrustLang&lt;/em&gt;, so defining multiple functions with the same name but different arguments is not possible, but you can &lt;a href=&#34;https://trust-lang.net/en/docs/types/funcs/&#34;&gt;override a function&lt;/a&gt;, including extending the types of accepted arguments or increasing their number.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Namespaces</title>
				<link>https://trust-lang.net/en/docs/syntax/namespace/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/namespace/</guid>
				<description>&lt;p&gt;&lt;em&gt;TrustLang&lt;/em&gt; supports namespaces, where the separator, like in C++, is a double colon &amp;ldquo;&lt;strong&gt;::&lt;/strong&gt;&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;A namespace can be specified for an individual identifier or for an entire &lt;a href=&#34;https://trust-lang.net/en/docs/ops/block/&#34;&gt;code block&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Unlike &lt;em&gt;namespace&lt;/em&gt; in C++, namespaces in &lt;em&gt;TrustLang&lt;/em&gt; are used not only to organize code into logical groups and avoid name conflicts,&#xA;but also to associate an identifier, explicitly specifying the namespace,&#xA;with static objects (memory allocated during the compilation stage of the program).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Модули и пакеты</title>
				<link>https://trust-lang.net/en/docs/syntax/modules/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/modules/</guid>
				<description>&lt;p&gt;В &lt;em&gt;TrustLang&lt;/em&gt; реализована концепция программных модулей и пакетов - которая повторяет идею иерархического расположения файлов&#xA;в каталогах файловой системы, примерно так же, как это сделано в языке Python, но разделителем имен выступает не точка,&#xA;а символ &amp;ldquo;&lt;strong&gt;\&lt;/strong&gt;&amp;rdquo; (как разделитель каталогов в Windows).&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Имя модуля может содержать только строчные английские буквы или цифры.&#xA;Данное ограничение связано с прямым отображением имен модулей на объекты в файловой системе,&#xA;так как у разных файловых систем могут быть различные возможности с поддержкой кодировок&#xA;и разные требования к преобразованию регистров символов.&lt;/em&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Управление памятью, ссылки и совместный доступ</title>
				<link>https://trust-lang.net/en/docs/syntax/memory/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/memory/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://habr.com/companies/otus/articles/763810/&#34;&gt;https://habr.com/companies/otus/articles/763810/&lt;/a&gt;&#xA;&lt;a href=&#34;https://habr.com/articles/764420/&#34;&gt;https://habr.com/articles/764420/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Последовательная согласованность отсутствует (отсутствуют атомарныти типы)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Любой язык программирования так или иначе вынужден управлять оперативной памятью.&#xA;В &lt;em&gt;TrustLang&lt;/em&gt; реализовано автоматическое управление памятью без сборщика мусора.&lt;/p&gt;&#xA;&lt;p&gt;За основу была взята модель &amp;ldquo;владения&amp;rdquo; из языка Rust, но она переработана под концепцию сильных&#xA;и слабых указателей (аналоги &lt;em&gt;shared_ptr&lt;/em&gt; и &lt;em&gt;weak_ptr&lt;/em&gt; из С++),&#xA;где каждое значение в памяти может иметь только одну переменную-владельца с &lt;em&gt;сильным&lt;/em&gt; указателем.&lt;/p&gt;&#xA;&lt;p&gt;И когда такая переменная-владелец уходит из области видимости, счетчик ссылок уменьшается и при достжении нуля память освобождается.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Macros</title>
				<link>https://trust-lang.net/en/docs/syntax/macros/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/macros/</guid>
				<description>&lt;p&gt;Macros are also used to transform the original code of &lt;em&gt;TrustLang&lt;/em&gt; into a more familiar syntax based on &lt;a href=&#34;https://trust-lang.net/en/docs/syntax/dsl/&#34;&gt;keywords&lt;/a&gt;,&#xA;as such text is much easier to understand when reading the original code later.&lt;/p&gt;&#xA;&lt;p&gt;In &lt;strong&gt;TrustLang&lt;/strong&gt;, macros are one or more consecutive terms that are replaced with another term or a whole syntactic construction (a sequence of lexemes).&lt;/p&gt;&#xA;&lt;p&gt;Macros are processed during the operation of the &lt;strong&gt;lexer&lt;/strong&gt;, i.e., before passing the sequence of lexemes to the parser,&#xA;allowing fragments of the language syntax to be modified using macros, for example, when implementing custom DSL dialects.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Системные свойства</title>
				<link>https://trust-lang.net/en/docs/syntax/sysprop/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/sysprop/</guid>
				<description>&lt;h3 id=&#34;системные-свойства&#34;&gt;Системные свойства&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%d1%81%d0%b8%d1%81%d1%82%d0%b5%d0%bc%d0%bd%d1%8b%d0%b5-%d1%81%d0%b2%d0%be%d0%b9%d1%81%d1%82%d0%b2%d0%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Несмотря на то, что не все объекты &lt;em&gt;TrustLang&lt;/em&gt; являются классами с точки зрения &lt;a href=&#34;https://trust-lang.net/en/docs/types/class/&#34;&gt;реализованной концепции ООП&lt;/a&gt;,&#xA;тем не менее, каждый объект имеет системные свойства, которые можно считать во время выполнения как обычные свойства объекта:&lt;/p&gt;&#xA;&lt;h4 id=&#34;у-всех-переменных-объектов-есть-системные-свойства&#34;&gt;У всех переменных (объектов) есть системные свойства&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%d1%83-%d0%b2%d1%81%d0%b5%d1%85-%d0%bf%d0%b5%d1%80%d0%b5%d0%bc%d0%b5%d0%bd%d0%bd%d1%8b%d1%85-%d0%be%d0%b1%d1%8a%d0%b5%d0%ba%d1%82%d0%be%d0%b2-%d0%b5%d1%81%d1%82%d1%8c-%d1%81%d0%b8%d1%81%d1%82%d0%b5%d0%bc%d0%bd%d1%8b%d0%b5-%d1%81%d0%b2%d0%be%d0%b9%d1%81%d1%82%d0%b2%d0%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;__name__ - краткое имя переменной (объекта)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;__full_name__ - полное имя переменной, включая имя модуля и пространство имен&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;__type__ - текущий тип переменной. Может изменится при некоторых операциях&lt;/p&gt;</description>
			</item>
			<item>
				<title>Опции и настройки компилятора</title>
				<link>https://trust-lang.net/en/docs/syntax/pragmas/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/pragmas/</guid>
				<description>&lt;h2 id=&#34;прагмы&#34;&gt;Прагмы&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%d0%bf%d1%80%d0%b0%d0%b3%d0%bc%d1%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3 id=&#34;предварительное-объевления-объектов&#34;&gt;Предварительное объевления объектов&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%d0%bf%d1%80%d0%b5%d0%b4%d0%b2%d0%b0%d1%80%d0%b8%d1%82%d0%b5%d0%bb%d1%8c%d0%bd%d0%be%d0%b5-%d0%be%d0%b1%d1%8a%d0%b5%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d1%8f-%d0%be%d0%b1%d1%8a%d0%b5%d0%ba%d1%82%d0%be%d0%b2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;@__PRAGMA_DECLARE__&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    @__PRAGMA_DECLARE__( func(arg) );&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;импорт-нативной-функции--переменной&#34;&gt;Импорт нативной функции / переменной&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%d0%b8%d0%bc%d0%bf%d0%be%d1%80%d1%82-%d0%bd%d0%b0%d1%82%d0%b8%d0%b2%d0%bd%d0%be%d0%b9-%d1%84%d1%83%d0%bd%d0%ba%d1%86%d0%b8%d0%b8--%d0%bf%d0%b5%d1%80%d0%b5%d0%bc%d0%b5%d0%bd%d0%bd%d0%be%d0%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;@__PRAGMA_NATIVE__&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    // import native int printf(char *format, ...)&#xA;    @__PRAGMA_NATIVE__( printf(format:FmtChar, ...):Int32 );&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;управление-диагностикой-компилятора&#34;&gt;Управление диагностикой компилятора&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%d1%83%d0%bf%d1%80%d0%b0%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b4%d0%b8%d0%b0%d0%b3%d0%bd%d0%be%d1%81%d1%82%d0%b8%d0%ba%d0%be%d0%b9-%d0%ba%d0%be%d0%bc%d0%bf%d0%b8%d0%bb%d1%8f%d1%82%d0%be%d1%80%d0%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;@__PRAGMA_DIAG__ -&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;        @__PRAGMA_DIAG__(push)&#xA;        @__PRAGMA_DIAG__(ignored, &amp;#34;-Wundef&amp;#34;)&#xA;        @__PRAGMA_DIAG__(warning, &amp;#34;-Wformat&amp;#34; , &amp;#34;-Wundef&amp;#34;, &amp;#34;-Wuninitialized&amp;#34;)&#xA;        @__PRAGMA_DIAG__(error, &amp;#34;-Wuninitialized&amp;#34;)&#xA;        @__PRAGMA_DIAG__(pop)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;@__PRAGMA_MESSAGE__&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    #pragma message &amp;#34;Compiling &amp;#34; __FILE__ &amp;#34;...&amp;#34;&#xA;    @__PRAGMA_MESSAGE__(&amp;#34;Compiling &amp;#34;, __FILE__, &amp;#34;...&amp;#34;)&#xA;&#xA;&#xA;    #define DO_PRAGMA(x) _Pragma (#x)&#xA;    #define TODO(x) DO_PRAGMA(message (&amp;#34;TODO - &amp;#34; #x))&#xA;&#xA;    @@TODO( ... )@@ := @__PRAGMA_MESSAGE__(&amp;#34;TODO - &amp;#34;, @#...)&#xA;&#xA;    @TODO(Remember to fix this)  # note: TODO - Remember to fix this&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;@__PRAGMA_WARNING__&#xA;@__PRAGMA_ERROR__&lt;/p&gt;</description>
			</item>
			<item>
				<title>Keyword syntax (DSL)</title>
				<link>https://trust-lang.net/en/docs/syntax/dsl/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/syntax/dsl/</guid>
				<description>&lt;h3 id=&#34;features-of-associative-memory&#34;&gt;Features of associative memory&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#features-of-associative-memory&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The syntax of the &lt;em&gt;TrustLang&lt;/em&gt; language is based on strict rules without the use of keywords,&#xA;and no matter how logical it may seem, association by keywords is much easier to remember, for example, &lt;strong&gt;if&lt;/strong&gt;,&#xA;than the combination &lt;em&gt;minus minus right angle bracket&lt;/em&gt; &lt;strong&gt;&amp;ndash;&amp;gt;&lt;/strong&gt;.&#xA;Because of this, it makes sense to use not a &amp;ldquo;pure&amp;rdquo; basic syntax, but a more familiar dialect with the use of keywords.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
