-
Notifications
You must be signed in to change notification settings - Fork 506
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
Feature/prop #3924
base: series/3.x
Are you sure you want to change the base?
Feature/prop #3924
Conversation
Thank you for looking at this! An interesting question for us to answer though is what we want to do with Native and JavaScript. This is a bit different from |
They both support System properties. It's basically just a global mutable map. |
A question: the |
I would agree. TBH, I wondered whether we should try and make them atomic, but that's probably not something you'd expect by system props. |
I don't think we can make them atomic. Or do you know a way? |
Right, not sure how could be made atomic. Citing Arman, it's basically just a global mutable map. |
Unfortunately I think it's still confusing. Anyway, I expect 99% of usecases to just be reading system properties. APIs that require setting/updating system properties seem really dicey 🙄 |
I'd just go with get, set and remove. If that's the functionality offered by the platform, and we can't provide atomicity, its best simply to wrap those. |
Similar to |
*/ | ||
def unset(key: String): F[Unit] | ||
|
||
def entries: F[Properties] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I like returning a mutable object here. (I think we usually try to avoid that?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Env
we decided to return an Iterable[(String, String)]
, but that was because of case-sensitivity issues which I don't think apply here. So probably makes most sense to return an immutable Map[String, String]
.
Addresses #3313.