-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make type names more intuitive / closer to the standard library #20
Comments
I'm not sure I get your point about the
From the code examples that you give, it seems you would like that the access to the value be done through the safe object, rather than the lock/access object:
whereas the way the library works is like this:
I never thought about this. I'll do now. |
Second part: I actually didn't even think about that conciously when I was writing the example. My fingers writing the code just assumed that if we have a safe string, we do stuff with/on the safe string. First part:
But it would be just like the standard: Alternatively, the two explicit options I mentioned for read-only access could be adapted for read-write access as well. Not a problem :-) |
I like it. Unfortunately, my eyes see |
Whoops, fixed a typo on one of my suggestions. If there's an extra param, no need for the sub-namespace. |
Not sure the extra param cuts it. Today, read-only Access and read-write Access are separate classes. The I did start playing with the concept though, but did not find anything satisfying yet. I'll keep this open just as a reminder. If I ever implement such a change, I'll consider switching to snake_case. So I'll close #19 and only keep this issue alive. |
Consider playing with the names a little bit, to make them more reminiscent of the standard-library-only idiom, and/or more "narratively intuitive".
My main peeve here is with the names
WriteAccess
(from the overview) and its siblingReadAccess
. Those don't sound like class names; and the instantiation is about gaining write access, it's not that the instance is the write access.Why not make it a little more like in the standard library, e.g.:
or maybe:
The text was updated successfully, but these errors were encountered: