While I am doing almost exceptional functional programming, I find that the distinction between const and let pretty worthless. I never rewrite the meanings of names. Never - regardless of language.
Having said that, I find use problematic for two reasons.
const longer than let (not serious!)const kind of communication: hey! I am permanent , but it’s not (it’s good, but ...) I had several colleagues who were completely surprised.
what is it possible
const x = { foo: "bar" } x["foo"] = "Not bar!"
Of course, the name and its link are const, but no link to the object is specified. Provided in Typescript, you can at least create
type ROO = Readonly<SomeType> const x: ROO = someReferenceValue x.someProp = "A wanna be a bar!"
So for Typescript, const can finally mean const
source share