Comment

Comment by tester756

>Why can’t I make local variables immutable?

How it'd work in such a case:

You declare immutable variable "a" which's an instance of a class

and then you execute "DoSomething" method which mutates under the hood?

Compilation error? runtime error?

Anyway have you tried records?

parent tester756 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton