Topics /

Programming Languages

The most popular blog posts about programming languages on Hacker News. 375 posts.

2025
333

Generic Containers in C: Safe Division Using Maybe

Martin Uecker, 2025-08-10 I discuss the implementation of type and bounds safe generic containers in C. Previously, I discussed a span type , bounds checking using arrays . and a a vector type . This time, I will discuss maybe inspired by Haskell. This type can used to return a value that may not exist, e.g. because…

334

10 Years of Betting on Rust

I wrote my first line of Rust in June 2015, a month after Rust 1.0 landed. Coming from C, Python, and JavaScript, I never looked back. Two Rust-based startups and 500k lines of Rust later, here are some reflections on the milestone.

342

I Wrote a Compiler

I have a Computer Science degree. I attended a whole course of lectures on compilers (and have a certain fondness for “the red dragon book” as a result). However, I had never actually written a compiler from start to finish until a rainy day last weekend.

345

Clojure Zippers (2021)

In this article, we will discuss zippers in the Clojure language. These are an unusual way to work with collections. Using a zipper, you can traverse a data structure arbitrarily and modify its content as well as search in it. A zipper is a powerful abstraction that pays off over time. However, it is not as…

347

Ways to generate SSA

Static Single Assignment is a program representation where each “variable” (though this term can be misleading) is assigned exactly once. Mostly the variables aren’t variables at all, but instead names for values—for expressions. SSA is used a lot in compilers. See this lesson from Cornell for converting Bril to SSA…

350

`std::flip`

std::flip is a little-known utility from the C++ standard library header <functional>: it is a higher-order function that accepts a Callable and returns an equivalent Callable with the order of its parameters reversed (or “flipped”).

351

Contracts for C

C++ seems to finally converge with their contracts proposal, I decided to give it a try and come up with ideas how such a thing would look for C. This is in early stages, not a full proposal yet, a…

353

Lambda Calculus and Lisp, part 1

The first of a series of envisioned blog posts on lambda calculus, and Lisp. It&rsquo;s unclear exactly where to start: there is a whole heap of interesting issues, both theoretical and in terms of concrete implementations, which tangle and interconnect. A particular application of lambda calculus is a very salient…

354

Zig 0.15.1

Zig is a general-purpose programming language and toolchain for maintaining robust , optimal , and reusable software.

355

The Expression Problem and its solutions (2016)

The craft of programming is almost universally concerned with different types of data and operations/algorithms that act on this data [1] . Therefore, it's hardly surprising that designing abstractions for data types and operations has been on the mind of software engineers and programming-language designers since…

360

Falsehoods programmers believe about null pointers

Null pointers look simple on the surface, and that’s why they’re so dangerous. As compiler optimizations, intuitive but incorrect simplifications, and platform-specific quirks have piled on, the odds of making a wrong assumption have increased, leading to the proliferation of bugs and vulnerabilities. This article…