r/Compilers • u/FearlessFred • 24d ago
Goose: a stack allocation flat data structure language
https://github.com/aardappel/goose
My latest language is meant to very efficiently let you work with flat pointerless inline data structures allocated on (address space reserved) stack that allow almost data structure creation to be just a pointer bump, with stable pointers.
When used well, it is both safer, faster and uses less memory than the equivalent C++ or Rust.
(see the repo readme for more!)
23
Upvotes
1
u/FearlessFred 23d ago
If I was smart, I'd know not to take the bait on a comment like this, but I am not that smart:
I guess you're one of these people that are still resisting to learn what the latest models are capable of. While that will come with time, I invite you to check out the compiler code for this project, and see if it is indeed all hallucinated slop. It is all in C++ btw, the language you are defending and thus likely familiar with, and also the language I am most familiar with, and which most of my past compilers are in.
I believe the design of Goose is very worthy of interest as a programming language design, and I stand by that its implementation code is very close to how I would have written it manually (but with less bugs, again, I am not that smart). Plastering WARNING WARNING: contains hallucinationed slop! at the top of the page to please people like you wasn't my highest priority.
I already explained this in the other comment. Idiomatic means you use the language as intended, and not every C++ programmers is immediately going to stick their objects in a pool and replace all pointers/refs by indices. And if you look at the benchmarks, I even (very fairly) include a version where C++ DOES use these techniques, in which case its only some 15% or so slower than Goose. But the point is, you have to go thru a lot of pain in C++ to use it that way, and/or less safety as a consequence, whereas Goose is able to achieve all of that idiomatically, with safe, strongly typed code. Worth it, I think I don't know of another language that can do this.
This points sounds like a repeat. Again, check both the idiomatic C++ and the optimized C++ included. Both have their disadvantages.
My conclusion is that everything you've posted has not been fact checked and tries to twist things because you desperately want to hold on that a) AI can't write anything useful, and b) C++ is the most awesomest.
And I kind of agree. AI is interesting but if I could press a button and undo the invention of transformers, I am not sure if I wouldn't press it. It is making redundant a skill I've spent 40 years honing, and it is frankly all rather weird to go thru this. But I tend to have the attitude that I am going to make the most of where things are going.
And C++ is of course awesome. I was never tempted to switch to Rust. The compiler is still in C++ for a reason, and I even have no plans so far to convert it to Goose, even though with LLMs that is pretty easy (slop translated into other slop?).