<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Hello World | 空垠尘</title><link>/en/tags/hello-world/</link><description>Minimalist Static · Boundless Edge</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>Dukang Xu</managingEditor><webMaster>Dukang Xu</webMaster><copyright>© 2026 空垠尘</copyright><lastBuildDate>Tue, 01 Sep 2026 10:00:00 +0800</lastBuildDate><atom:link href="/en/tags/hello-world/index.xml" rel="self" type="application/rss+xml"/><item><title>From Hello World to Programming Paradigms</title><link>/en/hello-world/</link><pubDate>Tue, 01 Sep 2026 10:00:00 +0800</pubDate><author>Dukang Xu</author><guid isPermaLink="true">/en/hello-world/</guid><description>As the opening article of this technical blog, we dissect the Hello World implementations in C, Go, Rust, TypeScript, Python, and Java to explore how programming paradigms and execution mechanisms have evolved.</description><content:encoded><![CDATA[<h2 id="introduction-the-totem-of-the-first-line-of-code">Introduction: The Totem of the First Line of Code</h2>
<p>&ldquo;Hello, World!&rdquo; is far more than a simple line of screen output. It is every developer&rsquo;s inaugural greeting to the digital universe and one of the most enduring symbols in software engineering history.</p>
<p>In 1972, computer scientist Brian Kernighan at Bell Labs first used a short print statement as a beginner example in <em>A Tutorial Introduction to the Language B</em>. Later in 1978, in the seminal book <em>The C Programming Language</em> (often known as K&amp;R) co-authored with Dennis Ritchie, this convention was formally established and took the computing world by storm:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="ln">1</span><span class="cl"><span class="cp">#include</span> <span class="cpf">&lt;stdio.h&gt;</span><span class="cp">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl">
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl">    <span class="nf">printf</span><span class="p">(</span><span class="s">&#34;hello, world</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">);</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><p>Over the past half century, computer hardware architectures have undergone profound transformations—from mainframes and personal PCs to cloud-native distributed systems and lightweight edge computing. Yet almost every modern programming language still preserves &ldquo;Hello World&rdquo; in the very first chapter of its documentation.</p>
<p>Why does this simple program remain timeless? Because behind a seemingly trivial print statement lies the condensed essence of a language&rsquo;s <strong>syntax structure, compilation model, memory management paradigm, and standard I/O runtime mechanism</strong>. As the first article on this blog, we explore the design philosophies behind programming language evolution through the lens of Hello World.</p>
<hr>
<h2 id="1-systems--procedural-programming-the-classic-foundation-of-c">1. Systems &amp; Procedural Programming: The Classic Foundation of C</h2>
<p>Born in the early 1970s to rewrite the UNIX operating system, C became the universal standard for systems programming thanks to its close-to-hardware expressiveness and peak efficiency.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="ln">1</span><span class="cl"><span class="cp">#include</span> <span class="cpf">&lt;stdio.h&gt;</span><span class="cp">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl">
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl">    <span class="nf">printf</span><span class="p">(</span><span class="s">&#34;Hello, World!</span><span class="se">\n</span><span class="s">&#34;</span><span class="p">);</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><h3 id="deep-dive">Deep Dive:</h3>
<ol>
<li><strong>Preprocessor Directive (<code>#include &lt;stdio.h&gt;</code>)</strong>: C is minimalistic. Standard I/O operations are not language keywords, but library functions. The preprocessor expands header declarations directly into source code prior to compilation.</li>
<li><strong>Entry Function &amp; Exit Code (<code>int main(void)</code>)</strong>: <code>main</code> serves as the entry point. Returning integer <code>0</code> informs the OS kernel of the process exit status (<code>0</code> signifies normal completion; non-zero denotes error).</li>
<li><strong>Syscalls &amp; Buffering</strong>: <code>printf</code> writes formatted strings to a user-space buffer for <code>stdout</code>. When encountering <code>\n</code> or buffer saturation, the runtime invokes the <code>write</code> system call, prompting the kernel to deliver bytes to the terminal device.</li>
</ol>
<hr>
<h2 id="2-cloud-native-concurrency--pragmatism-the-engineering-philosophy-of-go">2. Cloud-Native Concurrency &amp; Pragmatism: The Engineering Philosophy of Go</h2>
<p>Entering the 21st century, single-core CPU clock speeds hit physical barriers, propelling multicore processors and distributed clusters to the forefront. Google created Go (spearheaded by Rob Pike and colleagues) to tackle sluggish C++ build times, tangled dependencies, and cumbersome concurrency.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="ln">1</span><span class="cl"><span class="kn">package</span><span class="w"> </span><span class="nx">main</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="kn">import</span><span class="w"> </span><span class="s">&#34;fmt&#34;</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="kd">func</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="w">    </span><span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="s">&#34;Hello, World!&#34;</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><h3 id="deep-dive-1">Deep Dive:</h3>
<ol>
<li><strong>Mandatory Package Architecture (<code>package main</code>)</strong>: Go enforces engineering discipline at the syntax level. Any executable program must belong to package <code>main</code> and define a parameterless <code>main()</code> function.</li>
<li><strong>Explicit Imports &amp; Zero Dead Code</strong>: The Go compiler forbids unused imports and variables, eliminating bloat right at compile time.</li>
<li><strong>Sub-second Compilation</strong>: By intentionally omitting complex language features (no template metaprogramming, no macros, no header re-evaluations), Go can compile tens of thousands of lines in under a second.</li>
<li><strong>Explicit Over Implicit</strong>: Rejecting complex inheritance hierarchies and operator overloading, Go fosters uniform, highly readable code across large engineering teams.</li>
</ol>
<hr>
<h2 id="3-memory-safety--zero-cost-abstractions-the-rust-revolution">3. Memory Safety &amp; Zero-Cost Abstractions: The Rust Revolution</h2>
<p>As software scale skyrocketed, Microsoft and Google security audits revealed that over 70% of critical software vulnerabilities stem from C/C++ memory safety issues (dangling pointers, buffer overflows, use-after-free). Rust addresses this fundamental challenge through <strong>Ownership, the Borrow Checker, and Lifetimes</strong>.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-rust" data-lang="rust"><span class="line"><span class="ln">1</span><span class="cl"><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w">    </span><span class="fm">println!</span><span class="p">(</span><span class="s">&#34;Hello, World!&#34;</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><h3 id="deep-dive-2">Deep Dive:</h3>
<ol>
<li><strong>Compile-Time Macro (<code>println!</code>)</strong>: The exclamation mark indicates a macro invocation. Rust checks format strings and argument types at compile time, eliminating runtime crashes common in C-style <code>printf</code>.</li>
<li><strong>Zero-Cost Abstractions</strong>: Rust combines high-level ergonomic constructs (pattern matching, iterators) with the raw execution speed of handwritten C.</li>
<li><strong>GC-Free Memory Safety</strong>: Rust eliminates both manual <code>malloc/free</code> and runtime garbage collectors (GC). By tracking ownership lifecycles at compile time, it inserts deterministic deallocation calls (RAII) with zero runtime overhead.</li>
</ol>
<hr>
<h2 id="4-from-browser-scripting-to-edge-computing-typescript--javascript">4. From Browser Scripting to Edge Computing: TypeScript / JavaScript</h2>
<p>Originally designed by Brendan Eich in just 10 days in 1995 for basic Netscape form validation, JavaScript—supercharged by Google&rsquo;s V8 JIT engine, Node.js, and Cloudflare Workers—has evolved into a ubiquitous full-stack and edge language.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-typescript" data-lang="typescript"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1">// Strongly typed TypeScript version
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="kr">const</span> <span class="nx">message</span>: <span class="kt">string</span> <span class="o">=</span> <span class="s2">&#34;Hello, World!&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">message</span><span class="p">);</span>
</span></span></code></pre></div><h3 id="deep-dive-3">Deep Dive:</h3>
<ol>
<li><strong>Gradual Type System</strong>: TypeScript acts as a typed superset of JavaScript. Rich type annotations and generics provide compile-time safety, then compile away into clean vanilla JavaScript (Type Erasure).</li>
<li><strong>Event-Driven Non-Blocking I/O</strong>: Operating on a single-threaded Event Loop with microtask and macrotask queues, JavaScript handles high-concurrency network operations with minimal thread-switching overhead.</li>
<li><strong>Lightweight V8 Isolates</strong>: In modern edge architectures (like Cloudflare Workers), requests execute in lightweight V8 Isolates rather than heavy container VMs, booting in sub-milliseconds with memory footprints under a few megabytes.</li>
</ol>
<hr>
<h2 id="5-elegant-syntax--scientific-computing-pythons-glue-philosophy">5. Elegant Syntax &amp; Scientific Computing: Python&rsquo;s Glue Philosophy</h2>
<p>Created by Guido van Rossum during Christmas 1989, Python embodies the timeless principles of <em>The Zen of Python</em>: &ldquo;Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex.&rdquo;</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="ln">1</span><span class="cl"><span class="k">def</span> <span class="nf">main</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">    <span class="n">message</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&#34;Hello, World!&#34;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="n">message</span><span class="p">)</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl">
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&#34;__main__&#34;</span><span class="p">:</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl">    <span class="n">main</span><span class="p">()</span>
</span></span></code></pre></div><h3 id="deep-dive-4">Deep Dive:</h3>
<ol>
<li><strong>Dynamic Typing &amp; Interpreted Execution</strong>: Source code compiles into bytecode (<code>.pyc</code>) executed by the CPython VM, yielding rapid developer iteration.</li>
<li><strong>Top-Level Module Execution</strong>: The <code>if __name__ == &quot;__main__&quot;:</code> idiom allows a <code>.py</code> file to run as a standalone script or be imported safely as a library without unwanted side effects.</li>
<li><strong>Rich C/C++ Ecosystem</strong>: Excellent C foreign-function interfacing enables Python to wrap high-performance compute libraries (NumPy, PyTorch), cementing its role as the lingua franca of AI and data science.</li>
</ol>
<hr>
<h2 id="6-industrial-oop--enterprise-systems-javas-sturdy-evolution">6. Industrial OOP &amp; Enterprise Systems: Java&rsquo;s Sturdy Evolution</h2>
<p>Born at Sun Microsystems with the promise of &ldquo;Write Once, Run Anywhere&rdquo;, Java reshaped enterprise application engineering.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="ln">1</span><span class="cl"><span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">HelloWorld</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kd">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="n">String</span><span class="o">[]</span><span class="w"> </span><span class="n">args</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&#34;Hello, World!&#34;</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="w">    </span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><h3 id="deep-dive-5">Deep Dive:</h3>
<ol>
<li><strong>Pure Object-Oriented Paradigm</strong>: Everything in Java resides within a class. Even the simplest print statement requires declaring class scopes, access modifiers, and argument signatures <code>String[] args</code>.</li>
<li><strong>Bytecode &amp; Tiered JIT Compilation</strong>: Source code compiles into platform-agnostic <code>.class</code> bytecode loaded by the JVM. The HotSpot engine detects frequent code paths and JIT-compiles them into optimized native machine instructions.</li>
<li><strong>Enterprise Robustness</strong>: Strict encapsulation (<code>public/private/protected</code>), comprehensive exception handling, and modern garbage collectors (ZGC/G1) make Java the backbone of global banking, fintech, and distributed enterprise platforms.</li>
</ol>
<hr>
<h2 id="7-comparative-feature-matrix">7. Comparative Feature Matrix</h2>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Language</th>
					<th style="text-align: left">Core Paradigm</th>
					<th style="text-align: left">Type System</th>
					<th style="text-align: left">Memory Management</th>
					<th style="text-align: left">Build Output</th>
					<th style="text-align: left">Primary Use Cases</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>C</strong></td>
					<td style="text-align: left">Procedural / Imperative</td>
					<td style="text-align: left">Static / Weak</td>
					<td style="text-align: left">Manual (<code>malloc/free</code>)</td>
					<td style="text-align: left">Native Binary (ELF/Mach-O)</td>
					<td style="text-align: left">OS Kernels, Embedded, High-Performance Engines</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Go</strong></td>
					<td style="text-align: left">Concurrent / Pragmatic</td>
					<td style="text-align: left">Static / Strong</td>
					<td style="text-align: left">Runtime Garbage Collector (GC)</td>
					<td style="text-align: left">Single Executable Binary</td>
					<td style="text-align: left">Cloud-Native, Microservices, Network Proxies</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Rust</strong></td>
					<td style="text-align: left">Multi-paradigm / Zero-cost</td>
					<td style="text-align: left">Static / Strong</td>
					<td style="text-align: left">Compile-time Ownership (RAII)</td>
					<td style="text-align: left">Native Machine Code</td>
					<td style="text-align: left">Systems, Browser Engines, Blockchain, Security</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>TypeScript</strong></td>
					<td style="text-align: left">Multi-paradigm / Event-driven</td>
					<td style="text-align: left">Static Compile / Dynamic Run</td>
					<td style="text-align: left">V8 Generational GC</td>
					<td style="text-align: left">Plain JavaScript Code</td>
					<td style="text-align: left">Modern Web Frontends, Node Fullstack, Edge Workers</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Python</strong></td>
					<td style="text-align: left">OOP / Dynamic Scripting</td>
					<td style="text-align: left">Dynamic / Strong</td>
					<td style="text-align: left">Ref Count + Generational GC</td>
					<td style="text-align: left">Python VM Bytecode</td>
					<td style="text-align: left">AI, Data Science, DevOps Automation, Scripting</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Java</strong></td>
					<td style="text-align: left">OOP / Structured Enterprise</td>
					<td style="text-align: left">Static / Strong</td>
					<td style="text-align: left">JVM Garbage Collection (G1/ZGC)</td>
					<td style="text-align: left">JVM Platform Bytecode</td>
					<td style="text-align: left">Enterprise Backend, Distributed Systems, Fintech</td>
			</tr>
	</tbody>
</table>
<hr>
<h2 id="8-conclusion-languages-evolve-passion-endures">8. Conclusion: Languages Evolve, Passion Endures</h2>
<p>From humble 1970s terminal output to today&rsquo;s cloud, mobile, and serverless edge landscapes, syntax and toolchains continuously advance. New languages emerge to fix historical pain points, while classics reinvent themselves.</p>
<p>Regardless of shifting technological tides:</p>
<ul>
<li><strong>There is no single &ldquo;best&rdquo; language, only optimal trade-offs for a given scenario</strong>;</li>
<li>Code is written for humans to read, and only incidentally for computers to execute;</li>
<li>Curiosity about computing fundamentals, a commitment to clean architecture, and the joy of crafting software remain our true guiding lights.</li>
</ul>
<p>That is the true spirit of printing <code>Hello, World!</code> as our opening chapter.</p>
]]></content:encoded><category>Programming Languages</category><category>Hello World</category><category>Software Engineering</category><category>Architecture</category></item></channel></rss>