Best of 2019

The blog posts Hacker News loved most in 2019. 384 posts.

Programming Languages
221

Initialization in C++ is Seriously Bonkers

I was recently reminded of why I think it’s a bad idea to teach beginners C++. It’s a bad idea because it is an objective mess—albeit a beautiful, twisted, tragic, wondrous mess. Despite the current state of the community, this post is not a polemic against modern C++. This post is partly a follow-up on Simon Brand’s…

222

Compilers for Free

I’m fascinated by programming, and by metaprogramming in particular. When Ruby programmers talk about metaprogramming they usually mean programs that write programs , because Ruby has various features — like BasicObject#instance_eval , Module#define_method and BasicObject#method_missing — which make it possible to…

225

How an Optimizing Compiler Works

Optimizing compilers are a mainstay of modern software: allowing a programmer to write code in a language that makes sense to them, while transforming it into a form that makes sense for the underlying hardware to run efficiently. The optimizing compiler's job is to figure out what your input program does, and create…