Constants inside functions

I’d be happy to

function a(){
  const hey=33;

I love immutability. Do you?

Here is final hey = 33; since haxe 4.0 preview 2
There is no documentation yet, but you can learn more here Final by Simn · Pull Request #6596 · HaxeFoundation/haxe · GitHub
UPD Oh, this does not work locally, my bad.

Why wouldn’t final work for local vars? Was this intentional?

Hm… So why there is no way to declare immutable variable locally? Is it hard to implement? Is anybody against it?

Looks like the local implementation is still open to be implemented: Add final keyword · Issue #6584 · HaxeFoundation/haxe · GitHub