Hacker News new | ask | show | jobs
by bigtunacan 1291 days ago
I can see why this was added, but I don't see myself using it anytime soon.

If I just need a bundle of attributes and don't care about immutability then I will continue to use Struct.

If I do need immutability I will continue to use dry-struct (https://dry-rb.org/gems/dry-struct/1.0/) which has much deeper guarantees of immutability and type enforcement.

1 comments

Concurrent::ImmutableStruct is thread-safe and tested. Dry is cute, but too new.
5 years old is too new? concurrent-ruby is only 3 years older.
Dry is mature and has additional support for Monads, thread safe containers, schemas. I'm leveraging more than just struct from Dry.