Thoughts

mental health break ,./'"**^^$_---
I've only written a little bit of Zig, but I think it had a big impact on my coding style. Once I got my mind around them, Zig's structs
combine some of the grouping and encapsulation ideals provided by OOP with some of the functional-programming ideals of immutable objects and functions. It's really hard to describe because the lines are really blurry, but I think my point is that Zig rests perfectly in the gray area between those things. In Zig, methods are just name-spaced functions and struct function parameters are immutable. And yet, you can write normal OOP-style code by having your struct methods take a pointer to the struct, which allows them to modify the underlying data freely.
Link 9:53 a.m. Nov 11, 2023 UTC-5