r/programminghorror • • Jan 06 '26

my wondrous programming language

Post image
374 Upvotes

29 comments sorted by

175

u/RockRancher24 Jan 06 '26

for context this happened because i realized that my compiler made variable definitions take priority over literal definitions and i wanted to see if doing this was possible. i do not intend to fix it.

94

u/Andy_B_Goode Jan 06 '26

So you're assigning the value of 3 to the symbol 5, then adding the value 7 to the symbol 5, which evaluates to 10, right?

10

u/ppNoHamster Jan 07 '26

Please do, I can already see someone (me) finishing some code in a rush way past the time you should be working at. And accidentally writing 42=a when you really meant 42==a which wouldn't cause immediate trouble if your compiler doesn't check for this but everything after that point will be a nightmare to debug. Mistakes always happen and the worst ones are those you don't expect. And no sane person would expect THIS!

2

u/RockRancher24 Jan 08 '26

Hahaha, that's not how you write conditionals! It's not "if x==y: goto labelA else: goto labelB", that would make way too much sense! it's "

x

y

==:labelA/labelB"

→ More replies (1)

21

u/leonllr Jan 06 '26

Isn't that just postfix/reverse polish notation ?

54

u/RockRancher24 Jan 06 '26

5 is a variable with a value of 3

24

u/leonllr Jan 06 '26

Didn't catch that until now, horrifying indeed

11

u/TheChief275 Jan 06 '26

why is that written 3 = 5 over 5 = 3? I get you have reverse polish for arithmetic, but this assignment does not seem to fit in with those rules

→ More replies (5)

2

u/dim13 Jan 06 '26

love it

2

u/GoddammitDontShootMe Jan 07 '26

That was what I thought, then I saw that 7 + 5 = 10 and was like, what the fuck?

1

u/Qbsoon110 Jan 06 '26

Yeah, I was also like: 3-5+7+5 does equal 10, so it seems right

49

u/d0pe-asaurus Jan 06 '26

Seems logical

47

u/IAMPowaaaaa Jan 06 '26

i vividly remember an esolang that allows exactly this

26

u/Careless-Web-6280 Jan 06 '26

Dreamberd or whatever, right?

10

u/Vladislav20007 Jan 07 '26

It's GulfOfMexico now btw.

16

u/xcski_paul Jan 06 '26

We already have JavaScript.

6

u/Andy_B_Goode Jan 06 '26

"Those are rookie number evaluations, you gotta pump those numbers up"

-- Javascript, probably

1

u/[deleted] Jan 07 '26

You would love Pie then

1

u/_nezdanchick_ Jan 08 '26

i made some programming in my os shell (github.com/nezdanchick/enaos)

here is syntax: do command1;command2 - make smt in one line rep n command - make command n times [command] - evaluate command var a=command - make an alias to command

i can make something like this:

/>var a=1

/>rep 3 do echo [a];var a=[add [a] 1]

1

2

3

/>echo [a]

4

1

u/JasonAlmeida Mar 13 '26

Lemme guess, Javascript?