News for hackers. Stuff that matters.
Re:Ruby adds a new core Data class to represent immutable va... by bigtunacan on Tuesday November 29, 2022 @10:56PM (#33796854)
The libraries that provide immutability often provide stronger enforcement than this new Data class. I like the idea of something like this as part of Ruby core, but this was a chance to do it right and I don't think they took it far enough.
Re:Ruby adds a new core Data class to represent immutable va... by djur on Wednesday November 30, 2022 @12:12AM (#33797228)
You're thinking deep immutability? I'm not sure that's ever going to make sense to bundle with the language. Too many caveats.

I'd rather see incremental additions to this minimal Data API than trying to do too much at once. Lots of love for the Ruby dev team but they don't always have the clearest idea of what problems their users are trying to solve.

Re:Ruby adds a new core Data class to represent immutable va... by bigtunacan on Wednesday November 30, 2022 @10:35AM (#33802132)
Yes, that's exactly what I was thinking. The problem is that without deep immutability this is still open to abuse/miss-use. When I'm creating an immutable struct I'm trying to prevent future developers from accidental mistakes.