I wish JavaScript had a write-once const like Rust. Forced initialization of const in JavaScript means I end up using let even though the value will only be set once.
I wish JavaScript had a write-once const like Rust. Forced initialization of const in JavaScript means I end up using let even though the value will only be set once. 2 comments
Very rough draft here: Feedback appreciated! |
Okay, going to try and put together a formal proposal for this.