In Rust you can add methods to any type in a sane way. It's elegant, but hard to get used to after years of 'no monkeypatching!'
miniblog.
Related Posts
Should code completion offer private methods/fields?
If the user chooses a private method, you can offer a quickfix to change its visibility. It's clutter though.
I frequently find myself wanting fields that I haven't exposed yet, and frustrated that the IDE hides them.
Playing with Claude and my new programming language has made me add features that it wants. I think they're reasonable.
`for method in methods` -- custom syntax error explaining that `method` is a reserved word
`echo 'println("hello world")' | garden` -- eval snippets from stdin
I've been reading about the object-capability model as seen in the E programming language.
It reminds me of dependency injection, but used pervasively. Rather than calling static methods, you pass in object arguments and call methods in them.