A Programming Language Where Arrays Start at -1 and Variables Can Last Forever
Have you ever wondered why arrays start at zero? Or why some languages insist on starting at one? What if there was a third option nobody asked for? Gulf of Mexico (formerly known as DreamBerd) is a programming language that takes these questions and answers them in the most unexpected ways possible. It's a perfect programming language, according to its own README—and who are we to argue?
What It Does
Gulf of Mexico is a programming language with a deliberately unusual set of design decisions. It's not trying to be practical in the traditional sense—it's more of an exploration of what happens when you throw conventional language design out the window and see what sticks. The project recently underwent a rename from DreamBerd to Gulf of Mexico, which should give you some indication of the kind of whimsy you're dealing with here.
The language includes features like arrays that start at negative one, four different types of variable declarations, Unicode variable names (including emoji and numbers), and a lifetime system that lets you specify exactly how long a variable should exist. It's the kind of language where you end statements with exclamation marks and use semicolons as the "not" operator. If that sounds confusing, that's because it is—but that's also entirely the point.
Why It's Cool
-
Arrays start at -1. This is the headline feature, and it's genuinely funny. The README explains that starting at zero is unintuitive for beginners, while starting at one "isn't representative of how the code actually works." So Gulf of Mexico splits the difference in the most absurd way possible. You can also use floats as indexes, because why not?
-
Four types of declarations. You've got
const const(can't be changed at all),const var(can be edited but not reassigned),var const(can be reassigned but not edited), andvar var(can do both). It's like a matrix of mutability that forces you to think about exactly what kind of variable you need. -
The lifetime system is wild. You can specify how long a variable should exist using units like lines or seconds. Want a variable that lasts for exactly two lines of code?
const const name<2> = "Luke"!Want one that persists between program runs? Use<Infinity>. The README even mentions using negative lifetimes for variable hoisting, which is the kind of feature that makes you wonder what the compiler is actually doing. -
The
const const constkeyword. Introduced in 2023, this makes a value "constant and immutable" and will "never change." The README warns that it's "very powerful" and will "affect all users globally forever." This is either a joke or a threat, and I'm not entirely sure which. -
Exclamation marks are mandatory (sort of). You're encouraged to end every statement with an exclamation mark to "be bold." If you're unsure, you can use a question mark instead, which prints debug info about that line. It's a small touch that makes the language feel more expressive—or at least more excitable.
How to Try It
The project is hosted on GitHub at todepond/gulfofmexico. The README doesn't include installation instructions, but it does link to an examples page where you can see the language in action. Start there to get a feel for the syntax and the kinds of programs people are writing.
If you want to explore further, the repository itself is the best place to start. You can browse the source code, check out the examples directory, and see how the language is implemented. The README also mentions a hidden examples page (which you can find if you're clever enough to look at the HTML comments), so there's a bit of an Easter egg hunt built in.
Final Thoughts
Gulf of Mexico isn't trying to replace Python or JavaScript. It's a language designed to make you think about why programming languages work the way they do—and to have fun doing it. The features are deliberately absurd, but they're also thoughtfully implemented. If you're a language design enthusiast, a compiler nerd, or just someone who enjoys a good programming joke, this is worth a look. It's not for everyone, but for the right kind of developer, it's a delightful rabbit hole to fall into.
Follow @githubprojects for more developer tools and open source projects.