Hacker News new | ask | show | jobs
by soraminazuki 1836 days ago
I can't disagree more. All of the languages you have listed are well known for having complex semantics. This is totally expected of any general purpose programming language, of course. But the Nix expression language, though Turing-complete, isn't meant to be a general purpose programming language. It's a configuration DSL for defining packages. As such, it has a much smaller feature set with fewer confusing semantics.

The Nix expression language is in essence just JSON with functions comprising of the following building blocks:

* Primitive values (strings, numbers, paths, booleans, null)

* Lists and sets

* Variables

* Functions

* Conditionals

* Assertions

* Arithmetic operators

And that's basically it. All of this is succinctly explained in the official documentation[1].

[1]: https://nixos.org/manual/nix/stable/#ch-expression-language

1 comments

Bazel has starlark, which is reduced python, which I've found in practice fairly easy to understand. Do you think the nix DSL could of been replaced with bazel's model of doing things and would meet the same functionality? I'm not very familiar with nix.