4 ms·
OK, I replace my naive question above with a different naive question: "Why not just use Haskell?"
by dbcurtis 10y ago
OK, I replace my naive question above with a different naive question: "Why not just use Haskell?"
- vertex-four 10y agoHaskell is honestly a larger language, and is a pain in the butt to write. If you're just writing configuration or a very simple package, Nix is basically "JSON with colons, multiline strings, and function calls". Haskell doesn't have a reasonable built-in syntax for dictionaries/maps/whatever you want to call them, which is 95% of Nix.
- seagreen 10y agoWell, you would use records, but records are a weak point of the Haskell language. I've discussed "why not Haskell" with some Nix people and they specifically mentioned the lack of row polymorphism.
- vertex-four 10y agoYou couldn't reasonably create a record for the NixOS configuration - the amount of options (fields) is massive. The all-packages.nix file is an untyped dictionary mapping strings to derivations as well.
- codygman 10y agoPurescript?
- benley 10y agoCan I just point out that pretty much all of these options, including guix, are things that were invented well _after_ nix was established as its own thing? (aside from Haskell and Scheme themselves, of course)
- qwertyuiop924 10y agoA third naïve question: why not just use a functional subset of Scheme? It's got a well-defined syntax for key/value mappings, which is fast enough, funcalls, and you can use lazy evaluation if you use a pure subset of the language. And in any rnrs complient Scheme, it's fairly trivial to make a strict functional dialect. And in Guile or Racket, it's even easier. Unfortunately, Guix doesn't do this. Which meant Guix can't guarantee referential transparency. Although if the packager is an ANY WAY competant, it will be maintained.
- vertex-four 10y agoA purely functional subset of Scheme, honestly, is different enough from most lisps that it's a new language on its own. If you're learning a new language, a new syntax isn't very hard. And there's not a terrible amount of people who think S-expressions are an inherently good syntax.
- qwertyuiop924 10y ago>A purely functional subset of Scheme, honestly, is different enough from most lisps that it's a new language on its own. No, it's not. It's a cut-down Scheme: Most of your scheme knowledge would apply directly, or indirectly. Besides, even if it was a different language, it's a pre-existing one: DSSSL is pretty much this. >If you're learning a new language, a new syntax isn't very hard. Yes, but for me, the choice is learning a new language that has no other applications, save package managment, and using a subset of a language I already know. >And there's not a terrible amount of people who think S-expressions are an inherently good syntax I said from my perspective. I'm a schemer, so I'm already on board with sexprs.
- vertex-four 10y ago> No, it's not. It's a cut-down Scheme: Most of your scheme knowledge would apply directly, or indirectly. Only if you regularly write code using purely functional scheme in the first place. The difficulty of writing in a new language is very rarely figuring out what function calls to make, at least for me - it's about thinking in terms of the language.