Structs are getting slightly better over time, but I always end up reaching for the value semantics gem instead.
Do you think anything like Zig’s anonymous struct literals might work in Ruby? Basically some syntax to initialize an OpenStruct. It’d have to be required by default, I guess, but it would be nice to have.
OpenStruct
I’m not sure how those are different from the named arguments to initializers pattern ruby has always had
Structs are getting slightly better over time, but I always end up reaching for the value semantics gem instead.
Do you think anything like Zig’s anonymous struct literals might work in Ruby? Basically some syntax to initialize an
OpenStruct
. It’d have to be required by default, I guess, but it would be nice to have.I’m not sure how those are different from the named arguments to initializers pattern ruby has always had