-
Notifications
You must be signed in to change notification settings - Fork 162
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
val
or def
for read-only properties in facades?
#552
Comments
My only concern is that just because a JS property is read-only publicly, doesn't mean its value never changes, it can still be a privately mutable variable with a public read-only accessor. If we use a We could just make everything a |
Right, that's a really important point.
Via https://www.scala-js.org/doc/interoperability/facade-types.html. I read this as it doesn't make a difference at runtime. Still, safest is to make them all |
Oh I didn't. I read it as describing the same as I did, but with no indication of the impact of the semantics difference.
Yeah I agree. I don't want to spend my life perfecting every nuance of this library (unless I'm being sponsored). I think it would be quite fair to have a few practices that reduce our maintenance costs so long as it doesn't have a significant impact on users. To be fair, it's also for this same pragmatic reason that I also don't mind there being inconsistency around this. I'd be happy with either. Actually, come to think of it, there are certain causes like |
Fair point. Ok, IDK if it's worth mentioning in contributing docs, but at least let's be mindful of this when reviewing. |
The policy would be something like " |
Yeah very good point. I'll add that to the doc soon |
Documented in #523. |
Two parts to this.
The text was updated successfully, but these errors were encountered: