Topics /

Programming Languages

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

2024
218

Performance Analysis of Python's Dict() and {}

Some time ago, during a code review, I had a discussion with a colleague of mine about preferring dict() over {} in new Python code. They argued that dict() is more readable — and expresses intent more clearly — therefore should be preferred. I wasn’t convinced by that, but at that time I didn’t have any…

226

Cursed Linear Types in Rust

Inspired by Jack Wrenn’s post on Undroppable Types in Rust, I set out to see if it’s possible to create types that must be used exactly once. From my understanding, those things are called linear types, but don’t quote me on that1. Unless you are quoting the title of this article which explicitly says linear types… I…

229

Elixir Gotchas

No, I’ve not gone to the click-baiters (“10 tips that will change your life today!!!”), but I chose to limit myself to just 10 so that I don’t pull what is considered a &#82…

231

Ruby might be faster than you think

I saw a project a couple weeks back which allows writing and running Crystal methods inline inside a Ruby file. It’s a neat project, and I don’t want to take away from it but something in the README example looked off to me. require 'crystalruby' require 'benchmark' module Fibonnaci crystalize [n:

232

The theory of concatenative combinators (2007)

This article attempts to outline, in informal terms, a new theory of combinators, related to the theory of Combinatory Logic pioneered by Moses Schonfinkel, Haskell Curry, and others in the 1930s. Although not essential, an understanding of the classical theory of combinators may be helpful (see the links at the…

234

Move semantics in Rust, C++, and Hylo

I just finished reading the paper Borrow checking Hylo . It outlines the basic design of Hylo . Hylo is an early-stage programming language, but unlike other contenders of C++, it provides memory safety like rust. Specifically it merges rust’s borrow checking ideas into the framework of moveable value semantics (MVS)…

239

Bringing Faster Exceptions to Rust

Three months ago, I wrote about why you might want to use panics for error handling. Even though it’s a catchy title, panics are hardly suited for this goal, even if you try to hack around with macros and libraries. The real star is the unwinding mechanism, which powers panics. This post is the first in a series…