Hacker News new | past | comments | ask | show | jobs | submit login

Is evaluation lazy in TypeScript ?

For me, one of the most important features of a configuration language is the ability to directly refer to other values of the configuration, and more importantly, in the case of a configuration split in separate modules, to refer to values that could be provided by the other modules.

Essentially, this means that the final configuration should be the fixed point of a function, that the user would provide the configuration as a definition of this function (or in the case of multiple modules, as multiple definitions that would be merged using function composition), and that the evaluator would be able to determine the fixed point of this function.

I feel like this kind of configuration (used notably in NixOS) provides a lot of what's missing in traditional configuration languages, makes it easier to compose configuration modules, without requiring to write the configuration in a Turing-complete language.




Typescript is definitely eagerly evaluated unless you were to use a first class function to defer execution




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: