t4mer@notebook

// learning · #02 · c++ · php · 2 august 2026 · 1 min

PHP recycles the process. C++ does not.

A Web Developer Learns C++ · #02

A Web Developer Learns C++

PHP fails at runtime with a stack trace that, at least, points at a file you wrote. C++ fails at compile time with a template error that points at a file you did not know you included.

I used to think “the compiler is strict” meant “it nags about types”. It also means: you will learn to read errors as a conversation. The first twenty lines are not always the useful ones.

The process will not parent you

In PHP, process shutdown is a feature. FPM workers die. Memory comes back. File handles go away. You can be undisciplined and the operating system will parent you.

C++ will not. RAII - tying resource lifetime to object lifetime - is the adult version of try/finally. Once I stopped treating destructors as OOP trivia and started treating them as “this is how the file actually closes”, the language felt less hostile.

I keep reaching for a framework

This is the embarrassing part.

In Laravel I know where things go. In C++ I keep looking for the container, the service provider, the app(). Qt will give me some of that shape later. For now, the correct move is smaller: a main, a class, a test, a refusal to invent a framework on week two.

Compilation vs the interpreter in my head

I still catch myself thinking “I’ll just refresh the page”. There is no page. There is a binary, a linker, and a kit that may or may not be the kit you thought you installed. That is not worse. It is a different kind of feedback loop, and I am slow at it on purpose.