Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@lorentz I commend his autistic commitment to "no hidden control flow" but at some point we all just have to come to terms with the fact that automatic destructors are a really good idea
-
@12bitfloat They are a good idea, but I'm very curious if we manage to come up with an even better idea to address the same problems, and if we ever do, it'll probably be due to people's autistic commitment to all the maxims destructors tend to violate.
-
@lorentz Maybe something with memory arenas? And predictive memory placement? (as in the compiler can see likely data usage and make a single allocation at the startup or something, just throwing stuff at the wall)
-
@BordedDev I don't fully understand what you mean, but generally I would say that Zig seems to favour user-defined memory management. In this model, destructors - whether automatic or manual - have to be user-defined, since the actions needed to release memory are part of the memory management scheme.
-
@BordedDev Arenas are an interesting research area. I believe pony (?) uses them
But still, having deterministic constructors is just so nice. You know when something gets destroyed and so you can rely on it
Like a mutex guard automatically unlocking a mutex when it goes out of scope
Zig needs to get its shit together frankly.
I know the guy wants to perfect his little design, but has he never considered the fact that the shifting sands of perfection will never align for him?
Instead of working on making progress with the design he already established, he just keeps going back and changing fundamental parts as he sees fit and never making any forwards prog-
oh my god he's me.
rant