Topics /

Programming Languages

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

2025
271

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…

272

Why is hash(-1) == hash(-2) in Python?

While browsing Reddit the other day waiting for my code to compile, I ran across this question on r/Python: is hash(-1) == hash(-2) an easter egg? Wait, is that really true? $ python Python 3.9.6 (default, Jun 29 2021, 00:00:00) [GCC 11.1.1 20210531 (Red Hat 11.1.1-3)] on linux Type "help", "copyright", "credits" or…

280

Homegrown Closures for Uxn

For a week or so now, I've been writing niënor , a "lispy environment for uxn" . I did not want it to become a full-blown lisp but just another way of writing uxntal . Uxntal is a bit too dense for my liking, and I prefer lisp/scheme s-expression syntax. Niënor is just a compiler and a macroexpander that takes in…

283

Go Data Structures: Interfaces (2009)

Go's interfaces—static, checked at compile time, dynamic when asked for—are, for me, the most exciting part of Go from a language design point of view. If I could export one feature of Go into other languages, it would be interfaces.