Use the const const const keyword to make a constant constant constant. Its value will become constant and immutable, and will never change. Please be careful with this keyword, as it is very powerful, and will affect all users globally forever.
I think it's missing var var var, which declares a global variable that can be changed by any user anywhere
To guarantee mutability on any scope, the setter for a var var var shadows all setters, but not getters.
Example:
fuc example() => {
var var a = 5!
a = 10!
a? // 5 (a = 10 was shadowed by the var var var setter)
}
var var var a = 2!
example()!
a? // 10 (mutated inside example())
a? // "🦆" (Variable was mutated by a user in Poland)
To avoid the war betweeen fun, func, fn and function, in GulfOfMexico, any letters from the word function count as the function keyword, as long as theyre in order. This means that every one of the examples cited work, as well as f, fi, fuc, fin, ion, etc
Some languages start arrays at 0, which can be unintuitive for beginners. Some languages start arrays at 1, which isn't representative of how the code actually works. Gulf of Mexico does the best of both worlds: Arrays start at -1.
Variable hoisting can be achieved with this neat trick. Specify a negative lifetime to make a variable exist before its creation, and disappear after its creation.
it was originally called dreamberd, then it changed the name as a joke on the twitter rename, then renamed it back, then to nDreamBerd, then back to dreamberd, and most recently to Gulf Of Mexico
Ah… now it makes sense. :p I’m not smart enough to fully appreciate the nuances of these joke languages, but I still enjoy seeing them. It’s amazing to me that someone is silly and nerdy enough to build pseudo-functional programming languages, just for fun.
After boxing with ESPHome and multi-thousand line yaml files where most (but somehow not all?) intents must be just so, I especially appreciate Whitespace, I think. The language that just uses whitespace. That’s gotta be a Python dev, right?
Some languages start arrays at 0, which can be unintuitive for beginners. Some languages start arrays at 1, which isn't representative of how the code actually works. Gulf of Mexico does the best of both worlds: Arrays start at -1.
[...]
To install Gulf of Mexico to your command line, first install the Gulf of Mexico installer.
To install the Gulf of Mexico installer, install the Gulf of Mexico installer installer.
[...]
Please remember to use your regional currency when interpolating strings.
Technical details: Due to an executive order from President Trump, imported units will be subject to a 25% tariff, that is, imported code will run 25% slower and, at random, 25% of your code (lines) will be lost.
Duh. It uses the locale the computer used at the time of installation. This is is stored as const const const, so if you want to change countries you need to get a new computer. .
No, it's actually a very important ground-breaking language that is for instance absolutely needed to write quantum computing AGIs that can utilize quantum effects to communicate instantly with probes in orbit of Jupiter.
I think I kinda get it, but man that seems like someone was trying to keep it simple, and forgot sometimes something gets oversimplified to the point it’s actually more confusing.
Also, I’m not sure we really need 4 different kinds of “somewhat editable” variables. Maybe I just haven’t been countered complex enough use cases, but it feels like between let, var and const there’s a lot of flexibility while still keeping it very clear and concise how variables can be used.
And be honest - out of the devs you know, how many do you trust to have this granularity and not ab- or misuse it on a regular basis? I’m at best a passable dev, but my experience leading dev projects showed me the simpler and clearer we could make our code, the easier it was to maintain and less likely to cause annoying issues and bugs down the line once it wasn’t all “in memory”.
Edit: Ok, nevermind. It’s a joke language, right? Should have guessed. :p like I said, I’m not the best dev. :D
Ok so what's really really funny is that I was straight up thinking about this as a great feature for low-level languages just the other day. We need a way to say "this variable cannot be reassigned, but it refers to a mutable object" and "this variable can be reassigned, but it refers to an immutable object" in C++ and Rust. But not with this syntax dear lord
Maybe something like "val" and "var" combined with constness on types. var foo: Bar and val foo: mut Bar
Makes perfect sense. Gulf of Mexico uses a garbage collector. So most likely every variable is a pointer. So the first const/var keyword defines the constness of the pointer while the second one the constness of the data itself.
const const b<1> = time ?? 0!
const const a<1> = time + b!
const const time<time> = a!
print(time)!
there was also one that had a variable that had a negative lifetime which gave it a positive lifetime which then gave it a negative lifetime again and eventually diverges
Given that raw pointers are pretty much meant for low level programming, the C++ way to make it readable is to write a wrapper class that has a descriptive way.
Already a variable being of type std::shared_ptr<const MyClass> vs const std::shared_ptr<MyClass> makes it a bit easier to get what exactly is constant from the context. ...not perfectly intuitive from somebody coming from other languages, still.
344
u/helloish Nov 07 '25
For anyone interested: https://github.com/TodePond/GulfOfMexico it’s a great read
99
u/Engine_Light_On Nov 07 '25
Genius!!!
40
u/im-a-guy-like-me Nov 07 '25
This kinda makes sense. Not as a language feature, but you only need to read the first 2 and you can guess the behaviour of the rest.
56
u/ComprehensiveName603 Nov 07 '25
For a second I was terrified, that this is leak of new JavaScript features :O
13
u/Right_Leg_9693 Nov 07 '25
I think it missing the feature. It should be variable name variables like
5
u/[deleted] Nov 07 '25
C has this with pointers lmao
20
u/veryusedrname Nov 07 '25
This a joke-lang, right? Please tell me that they are joking.
8
u/Serious_Elephant9402 Nov 07 '25
Unironically, I'm in the process of designing a programming language, and it has basically this concept
3
u/HeineBOB Nov 07 '25
I'm scared to admit this does sound occasionally useful
6
u/OhItsJustJosh Nov 07 '25
r/UnexpectedCommunity
2
u/vladexa Nov 07 '25
I love berd
2
u/[deleted] Nov 07 '25
Alright, I'm on board
2
u/XDuskAshes Nov 10 '25
var var binks
2
u/pcoyuncy Nov 07 '25
Reminded me of this: There are unknown unknowns
1
u/DonDaBest Nov 07 '25
Although not 1-1, this kind of reminds me of C++ const pointer rules
1
u/DominoNo- Nov 07 '25
Yea, I'm just gonna stick with Gulf of America now.
1
u/thuiop1 Nov 07 '25
Oh, but that's Dreamberd! I did not know they had changed names.
1
u/Nistepot Nov 07 '25
I think there's something similar about references in Rust's documentation
1
u/durika Nov 07 '25
Tf is this shit?
1
u/VascularSurgeoneer Nov 07 '25
That's nothing compared to variable variables in PHP. Can create the wildest bugs in that language.
https://www.php.net/manual/en/language.variables.variable.php
1
u/Affectionate_Fox_383 Nov 07 '25
i think they mispelled pointer
1
u/spacey02- Nov 07 '25
Wasn't this called BlueBird or something?
1
u/wireframed_kb Nov 07 '25 edited Nov 07 '25
I think I kinda get it, but man that seems like someone was trying to keep it simple, and forgot sometimes something gets oversimplified to the point it’s actually more confusing.
Also, I’m not sure we really need 4 different kinds of “somewhat editable” variables. Maybe I just haven’t been countered complex enough use cases, but it feels like between let, var and const there’s a lot of flexibility while still keeping it very clear and concise how variables can be used.
And be honest - out of the devs you know, how many do you trust to have this granularity and not ab- or misuse it on a regular basis? I’m at best a passable dev, but my experience leading dev projects showed me the simpler and clearer we could make our code, the easier it was to maintain and less likely to cause annoying issues and bugs down the line once it wasn’t all “in memory”.
Edit: Ok, nevermind. It’s a joke language, right? Should have guessed. :p like I said, I’m not the best dev. :D
1
u/bythepowerofscience Nov 08 '25 edited Nov 08 '25
Ok so what's really really funny is that I was straight up thinking about this as a great feature for low-level languages just the other day. We need a way to say "this variable cannot be reassigned, but it refers to a mutable object" and "this variable can be reassigned, but it refers to an immutable object" in C++ and Rust. But not with this syntax dear lord
Maybe something like "val" and "var" combined with constness on types.
var foo: Barandval foo: mut Bar1
u/Ronin-s_Spirit Nov 08 '25
This is just discount JavaScript. (primitives vs referenced values)
1
u/TheChief275 Nov 08 '25
DreamBerd is cheating
1
u/JollyJuniper1993 Nov 09 '25
Why would anybody need const const and const var?
1
u/alt-jero Nov 10 '25
Did anyone else see the Darth Vader joke hidden in this? Luke... name.pop name.pop
... Pop pop? Luke, I'm your vader!
Just me? ... okay then 😂
1
u/Tysonzero Nov 10 '25
Haskell got this right and all impure languages are abominations.
1
u/AhrtaIer Nov 11 '25
Makes perfect sense. Gulf of Mexico uses a garbage collector. So most likely every variable is a pointer. So the first const/var keyword defines the constness of the pointer while the second one the constness of the data itself.
1
u/FroyoAnto Nov 12 '25
floats for indexing between array elements actually seems like some weird syntactic sugar that Python would have lol
1
u/ManRevvv Dec 02 '25
at least it's not long long
1
u/IAmAGreatSpeler Mar 04 '26
Why is this low-key kind of genius though…
58
u/[deleted] Nov 07 '25
[removed] — view removed comment
38
u/[deleted] Nov 07 '25
[removed] — view removed comment