this post was submitted on 03 Jul 2025
179 points (96.4% liked)

Linux

56211 readers
2585 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] heraplem@leminal.space 5 points 5 days ago* (last edited 5 days ago)

There are a few gnarly things about Nix, even for someone who's familiar with Haskell (the most similar language to Nix that's even close to mainstream).

  • Dynamic typing (you mention this briefly). Some people like the extra flexibility that dynamic typing gives, but there's a tradeoff: more errors. The thing is, due to NixOS's complicated structure, the traceback for an evaluation error might not give you any information about where the cause is (indeed, the traceback might not include a single line of your own code!). This makes errors unusually costly in NixOS specifically, so any language feature that causes more runtime errors automatically has a worse impact than it would in a more "normal" language.
  • The "standard library" (builtins) is extremely sparse. You basically have to depend on at least nixpkgs-lib if you want to get any real work done.
  • No real data abstraction mechanisms. No ADTs, no nominal types. The only composite types are attrsets and lists. The usual way to encode a custom type is as an attrset with a _type field or some such.
  • While we're at it, very limited pattern-matching.
  • Clunky list literal syntax: no commas between list elements. I can't tell you the number of times I've forgotten to surround list elements in parentheses.
  • Can anyone remember the rules for escaping ${ or ''? I have to look them up every time.