maralorn,
@maralorn@chaos.social avatar

I see a problematic tendency in the ecosystem. The bad discoverability and loose typing of Nix pushes people into relying on the module system for more and more things.
Sadly the module system is a very questionable ad-hoc solution because it breaks laziness. I hope we find a better solution than introducing this big amount of complexity into all our code.

roberth,
@roberth@functional.cafe avatar

@maralorn
It is lazy though!

Slightly less lazy than Nix in a few cases, but still very lazy.

maralorn,
@maralorn@chaos.social avatar

@roberth Yeah, I know it is. But it is less lazy than other ways of composing. Every imported module file needs to be loaded. Every imported flake-parts module needs to be downloaded.

I assume a lot of people have been bitten by

imports = if ... then .. else ..;

resulting in an infinite recursion.

Maybe this is the best we can do within Nix … I don’t know.

anselmschueler,
@anselmschueler@ieji.de avatar

@maralorn I feel like the module system should be rewritten to be a core part of Nix itself, so it's less janky, faster, and can be used more.

farcaller,
@farcaller@hdev.im avatar

@maralorn I was just thinking about the lack of types the other day and how nix reminded me a lot of javascript. Conicidentally, I had to write some javascript recently where I couldn't use TS.

Types reduce the cognitive load so much! Trying to dig through some darker parks of nixpkgs' libs would have been so much easier if the types system was there. nil helps a lot, but it doesn't cover all the use cases.

raito,
@raito@nixos.paris avatar

@maralorn I am hopeful we will, cc @gdd :-))))

  • All
  • Subscribed
  • Moderated
  • Favorites
  • NixOS
  • kavyap
  • thenastyranch
  • ethstaker
  • DreamBathrooms
  • osvaldo12
  • magazineikmin
  • tacticalgear
  • Youngstown
  • everett
  • mdbf
  • slotface
  • ngwrru68w68
  • rosin
  • Durango
  • JUstTest
  • InstantRegret
  • GTA5RPClips
  • tester
  • cubers
  • cisconetworking
  • normalnudes
  • khanakhh
  • modclub
  • anitta
  • Leos
  • megavids
  • provamag3
  • lostlight
  • All magazines