Topics /

Programming Languages

The most popular blog posts about programming languages on Hacker News. 5,634 posts.

Any year
5581

The Typestate Pattern in Rust

The typestate pattern is an API design pattern that encodes information about an object’s run-time state in its compile-time type . In particular, an API using the typestate pattern will have:

5583

PHP: a fractal of bad design

(This article has been translated into Spanish (PDF, with some additions) by Jorge Amado Soria Ramirez — thanks!) Preface I’m cranky. I complain about a lot of things. There’s a lot in the world of technology I don’t like, and that’s really to be expected—programming is a hilariously young discipline, and none of us

5585

Clojure - Getting Started

Clojure is a dynamic development environment where you interact with your program while you write it, growing and adding to it while it’s running. To work with Clojure you need an editor that supports evaluation in source files and structural editing (working with nested forms in addition to character editing).

5588

The context sensitivity of C's grammar

Context free grammars (CFGs) are a valuable theoretical tool on which the modern compilation theory relies for parsing the code of programming languages. For example, the most popular tool used for parsing – YACC , generates parsers for CFGs. What most people don’t know 1 is that the vast majority of programming…

5590

John Resig - Simple JavaScript Inheritance

I’ve been doing a lot of work, lately, with JavaScript inheritance – namely for my work-in-progress JavaScript book – and in doing so have examined a number of different JavaScript classical-inheritance-simulating techniques. Out of all the ones that I’ve looked at I think my favorites were the implementations…

5591

Clojure - spec Guide

The spec library ( API docs ) specifies the structure of data, validates or conforms it, and can generate data based on the spec.

5594

Boolean Blindness

I hate Booleans! But isn’t everything “just bits”? Aren’t computers built from gates? And aren’t gates just the logical connectives? How can a Computer Scientist p…

5595

Five Questions about Language Design

(These are some notes I made for a panel discussion on programming language design at MIT on May 10, 2001.) 1. Programming Languages Are for People. Programming languages are how people talk to computers. The computer would be just as happy speaking any language that was unambiguous. The reason we have high level…

5596

Representing Code

To dwellers in a wood, almost every species of tree has its voice as well as its feature. Thomas Hardy, Under the Greenwood Tree

5597

Revisiting a 'smaller Rust'

A bit over a year ago, I wrote some notes on a “smaller Rust” - a higher level language that would take inspiration from some of Rust’s type system innovations, but would be simpler by virtue of targeting a domain with less stringent requirements for user control and performance. During my time of unemployment this…

5599

Using Pointers in SPARK

In this blog post, I will present one of the most interesting additions to the community 2019 version of SPARK: pointer support. One of the core…

5605

PEP 557 – Data Classes

This PEP describes an addition to the standard library called Data Classes. Although they use a very different mechanism, Data Classes can be thought of as “mutable namedtuples with defaults”. Because Data Classes use normal class definition syntax, y...

5607

PEP 8 – Style Guide for Python Code

This document gives coding conventions for the Python code comprising the standard library in the main Python distribution. Please see the companion informational PEP describing style guidelines for the C code in the C implementation of Python.