Topics /

Programming Languages

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

2021
391

Subclassing in Python Redux

The conflict between subclassing and composition is as old as object-oriented programming. The latest crop of languages like Go or Rust prove that you don’t need subclassing to successfully write code. But what’s a pragmatic approach to subclassing in Python, specifically?

393

Rust: Enums to Wrap Multiple Errors

This is a follow-up to Error handling in Rust from a couple of days ago. The moment we want to use error propagation for different error types, we have to rely on trait objects with Box<dyn Error>, which means we defer a lot of information from compile-time to runtime, for the sake of convenient error handling.

395

Worse Is Better (2001)

The concept known as "worse is better" holds that in software making (and perhaps in other arenas as well) it is better to start with a minimal creation and grow it as needed. Christopher Alexander might call this "piecemeal growth." This is the story of the evolution of that concept.

396

Threaded Code (1999)

What is threaded code? What is it good for? What are the differences between the various threading techniques? How do I implement threaded code portably? How fast are various threading techniques?