Topics /

Programming Languages

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

Any year
3182

The Problem with Macros

So we’re supposed to be writing a game, right? But in order to make progress, we have to fix a bug. And in order to fix the bug, we have to write a test. And in order to write a test, we have to write a test framework. And in order to write a test framework, we have to understand a thing or two about macros. Okay. So…

3196

Python's Type Checking Renaissance

You may have heard that TypeScript has been taking the web development space by storm in the last few years , bringing to it static types. I believe the same thing is starting to happen in the world of Python, where type checkers like mypy , Pyre , and Pyright are increasingly used, at least where Python is used by…

3197

The cost of Go's panic and recover

TL;DR ¶ Some of the wisdom contained in Josh Bloch’s Effective Java book is relevant to Go. panic and recover are best reserved for exceptional circumstances. Reliance on panic and recover can noticeably slow down execution, incurs heap allocations, and precludes inlining. Internal handling of failure cases via panic…

3198

Boeing Flies on 99% Ada

A discussion of how Boeing used Ada in its new 777 jet to run a complete fly-by-wire system that technicians backup and monitor with on-board floppy disks. The Ada Information Clearinghouse is the Ada Resource Association's official Web site on the Ada programming language and on software engineering.

3200

strcpy: A niche function you don't need

The C strcpy function is a common sight in typical C programs. It’s also a source of buffer overflow defects, so linters and code reviewers commonly recommend alternatives such as strncpy (difficult to use correctly; mismatched semantics), strlcpy (non-standard, flawed ), or C11’s optional strcpy_s ( no correct or…

3202

Why Elixir (2014)

It’s been about a year since I’ve started using Elixir. Originally, I intended to use the language only for blogging purposes, thinking it could help me better illustrate benefits of Erlang Virtual Machine (EVM). However, I was immediately fascinated with what the language brings to the table, and very quickly…

3203

The Strict Aliasing Situation Is Pretty Bad

One thing that works well in practice in cases where you really don’t want to process single bytes at a time is to use a union for going from one type to another. Granted, writing one member of a union and reading from a different one also isn’t allowed per the standard, but every compiler I’ve come across allows it…

3207

Final features of C++17

With last weeks C++ committee meeting in Oulu, C++17 is feature complete and on its way to become an international standard. After the last meeting in Jacksonville I had little hope to see big surprises, but Oulu managed to add a few important and interesting features to the new standard. There is a very good overview…