Skip to main content
  1. Blogs/

The Philosophy of Programming

··4 mins· loading · loading · · · Draft
Morethan
Author
Morethan
Computer, Physic & AI
Table of Contents
Casual essay - This article is part of a series.
Part 2: This Article
Programming is the serialization of a local world.

Preface
#

I have been working with computers for about two years now and have gone through a fair amount of hands-on programming practice. In the beginning, programming felt mostly like a tool—much like using a smartphone in daily life: ordinary, utilitarian, and taken for granted. But programming is fundamentally different from using a phone. It is intellectually demanding labor, and over time, the way you think begins to change. Gradually, I found myself being influenced by certain philosophies embedded in programming languages. I began to understand the subtle elegance behind different paradigms, and this is exactly where programming becomes fascinating: how can I describe something so complex? Or more precisely, how can I describe it in such an elegant way?

This article is not meant to define “philosophy” through abstract language. Words alone are not philosophy. Instead, I want to record those moments when a simple idea suddenly makes you think, “Oh, so that’s how it works.” These are the moments where you can feel the intentions and craftsmanship of language designers flowing through what otherwise seems like ordinary keystrokes.

React
#

React is not a programming language, but rather a programming paradigm. Much like object-oriented programming, it represents a way of thinking about code rather than a specific language. Its concrete implementation still relies on the TSX language. Personally, I think React defines a method for describing reactive user interfaces. I chose it as the first example because it was the spark that led me to start thinking seriously about programming philosophy.

Why is that? Let’s imagine an ideal modern website. A truly modern interface is not just static text—it is rich in elements, carefully designed visuals, and an overall layout that feels comfortable and natural. It also includes smooth interactions: backgrounds that subtly react to cursor movement, buttons that ripple like water when clicked, and animations that feel almost alive.

The vision is beautiful. The problem is expressing it to a computer. Describing such behavior in precise, logical steps is surprisingly difficult. This is where React offers a powerful abstraction. By using TSX and following a simple set of principles, you can express highly complex UI behavior in a relatively concise and structured way.

The official documentation includes a section called Thinking in React, which walks through a concrete example and explains how complex React applications are actually constructed.

To quote the documentation: React changes the way you think about visual design and application structure. When building a user interface with React, you first break it down into individual components, and then connect them so that data flows through the system.

After approaching a large React codebase with the wrong way of thinking, revisiting this short guide may finally make everything click. And perhaps that is the point of philosophy in programming after all.

Rust
#

I recently took a shallow dive into Rust programming, and my biggest takeaway is that Rust is incredibly straightforward in its design. Below is a description of Rust’s design goals from the official documentation:

In a nutshell, Rust’s most important goal is to eliminate the trade-offs that programmers have accepted for decades, allowing safety and efficiency, speed and ease of use to coexist.

From my very basic exploration, Rust indeed achieves the above. By introducing the ownership mechanism and lifetimes, it eliminates null pointers and the need for a garbage collector. Generics prevent redundant code, and Traits are used to constrain the behavior of generics. Other concepts are quite similar to those in other programming languages.

In short, Rust has truly delivered on its promises. As for the criticism Rust receives online, I believe it mostly stems from the complexity introduced to achieve these goals. After all, some concepts that are hidden within the compiler or runtime in other mainstream languages are brought to the forefront in Rust, but this is a necessary trade-off.

To make the Rust programming experience even better, its compiler deserves the most praise. The precise and detailed error messages quickly pinpoint the source of issues. Moreover, in this era of “vibe coding,” Rust’s rigorous and meticulous compile-time checks—bordering on pedantic—also enable AI to produce higher-quality code without the need for manual fine-tuning.

Opinion

Personally, I think Rust’s syntax is not hard to read. If you strip away some of the flashy syntactic sugar, Rust’s syntax requires almost no learning at all.

In conclusion, Rust feels like an attempt to improve upon C. It comes at the cost of added complexity and a steeper learning curve, but it maintains C’s efficiency while making the code significantly safer.

Casual essay - This article is part of a series.
Part 2: This Article

Related