
In my previous article the mess of virtual functions, I show how easily they introduce bugs and propose language extensions to fix it. Several comments suggested an alternate solution with the “non-virtual […]
In my previous article the mess of virtual functions, I show how easily they introduce bugs and propose language extensions to fix it. Several comments suggested an alternate solution with the “non-virtual […]
Virtual functions, though generally a blessing, have a defect-prone dark side. No language, that I know of, provides a way to encode when the base class should be called. This leads to […]
“Reference counting is slower than garbage collection”, a claim often made in the discussion of memory management. I heard it again recently when discussing Leaf; somebody took issue with my arguments against […]
Every day millions of programmers require the length of a string. Despite this there is no universal definition of what string.length actually represents. It changes between languages, and quite often doesn’t return […]
In the world of parametric programming our languages often seem quite varied and unique. At the core however are two primary approaches, let’s call them templates and generics. In this article I’ll […]
A new technology I’m trying has a curious domain-specific extension for OpenGL graphics. It introduces a block concept allowing for modular shader code. From a language standpoint I was uncertain what to […]
My previous article, “We don’t need a string type“, caused a bit of stir. Though the feedback is mixed, there is a common theme of a string being a useful feature. After […]
Does ‘return’ always cause a function to return? Surprisingly the answer is “no”. Indeed there are situations in which ‘break’ may not always break from a loop, and ‘goto’ may no go […]
There’s something wrong when a language allows 1/2 to equal 0. It’s easy to understand why this happens, and perhaps it’s even easy to forgive the limitations of C. Nonetheless it’s irksome […]
Below I’ve tried to catalog some of the typical uses of references in programming. My aim is to clarify the role references play in a language to help me decide how they […]
Not all languages are made with the same purpose in mind. When it comes to designing a new language like Leaf, it’s important to choose what type of language it will be. […]
Programmers don’t usually spend a lot of time thinking carefully about names and values. As long as we follow a few basic rules, our code will generally behave as expected. As I […]
Closures have been around a long time yet have experienced a resurgence in the last decade. They were first implemented in the functional language Scheme then later introduced to object-oriented programming in […]
How often does one need to write a custom language? Many projects often shun them, but I think domain specific languages are important. They offer unique features and make certain tasks easier. […]