ive been doing a bit of thinking about nixos errors. and like. to be clear, im sure that if nixos devs could make more useful error messages that they obviously would. and i myself am a pretty big fan of nixos, to the point of straight up evangelization in private circles
im interested though in finding out why nix's error messages dont end up working most of the time (especially for beginners)
i have a handful of observations: errors are very sparse, seem largely unrelated, expect too much knowledge of the underlying libraries, stack traces are quite large, individual points in a stack trace seem to vary wildly in relatedness, and an abundance of cryptic error messages
but that doesnt do much to explain why thats the case. its not helpful to just point out "look! bad thing about labguage!". at the same time though, this is kind of where i have to turn to other people; i cant come up with a single clear or concise explanation as to why
so in terms of solutions, my analysis kind of runs dry here. the right answer is probably the unsatisfyingly complicated bunch of different only-slightly-related answers; occam's razor may simply not be designed to shave these hairs. again, im sure that if nix devs could make the errors communicate more useful information, they already would have, and attempts have been made.
like i already said, i love nix and nixos; out of all the possible distros i could have used based on asahi linux, i chose nixos, basically knowing that itd probably be the most difficult choice. but my experience with nixos previously had told me it was worth it, and i still think it was. i dont regret my decision whatsoever. theres a lot that nix does really well. nix is, to use some deeply professional phrasing ive learned over the years, really fucking swagger
but i think that having discussions like this- talking about what languages and tools do wrong- is as important as discussing what they do right, so long is each is framed from the perspective of why
so im interested. anybody else with experience with nix, or any other programming languages that either produce immediately useful or decidedly useless error messages wanna chime in?
what makes a good error system? what do you think makes an error system bad, and what do you think can be done to make a good error system?
ill definitely be taking any discussion into consideration when working on my own language, and im sure plenty of others will to, so dont think that youre comments are getting thrown into the void, opinionated or not! lets try and make better error systems that programmers can better rely on when they make the sillies :3
(i pinkie promise one day ill bother to learn css and youll have prettier posts to look at)
