Hacker News new | ask | show | jobs
by __MatrixMan__ 868 days ago
My impression of typescript is that if you do:

a = 1;

and elsewhere:

a = 2;

The ultimate value of 'a' will depend on the order in which those statements are executed, right?

A configuration language should surface that as an error and tell you where all of the conflicting references are.

2 comments

Typescript does have const variables. But you can still often mutate the instances and there are many other reasons why a configuration language should be strictly free from side effects allowed in imperative languages.
If your tsconfig settings are strict enough this is a type error :)