5 ms·
Nix is one of the reasons open source wins in the long run. I would have never imagined that package dependencies could be installed and managed across programm
by emporas 2y ago
Nix is one of the reasons open source wins in the long run. I would have never imagined that package dependencies could be installed and managed across programming language boundaries, kernel boundaries, shell boundaries, dotfile boundaries etc.
Given that computer complexity grows exponentially all the time, then at some point everyone will be forced to use something like Nix.
I agree with the article with Emacs and Unix/Linux.
- fire_lake 2y agoFunctional Programming approaches usually win in the long run. This is a common thread in the article too, although not explicit.
- trashburger 2y agoI think you mean declarative. Whether something is FP or OP usually doesn't matter too much (unless you go to the extremes of each end of the sprectrum a la AbstractBeanFactory/IO Functor State). Declarative solutions last longer by virtue of their declarativeness; the underlying implementation can evolve as long as the declarative layer is untouched.
- zarathustreal 2y agoIsn’t a class a declaration (of a class type)? Isn’t a function a declaration (of an algorithm)? I’d assert that every programming language is declarative. Especially once you get enough written to constitute a DSL.
- chriswarbo 2y agoI'd say the distinction is more at the semantic level, i.e. denotational vs operational.
- bubblyworld 2y agoI think they mean declarative in the sense that you write down want you _want_ in a solution (prolog/datalog/terraform/etc) without specifying exactly how to compute it (day to day programming languages).
- zarathustreal 2y agoThe definition of computation depends on the abstraction level. Languages span multiple abstraction levels. The point is that there’s no meaningful definition of “declarative language” as proven by the examples I’ve already given. For example you can “compute” a roguelike in TypeScript types, but a type system is declarative!
- emporas 2y agoIf you are willing to go to extraordinary lengths, then yes any programming language can be written in a declarative style, at least some part of the program. Some parts of a Java or PHP program can be written declaratively. In the Nix language context however, they mean declarative and functional like Prolog. There is also Guix which uses Scheme to declare dependencies, and Scheme is not a declarative language. Scheme is a functional language, but it can be easily written in a declarative style.
- bubblyworld 2y agoEveryone knows this, friend. It's still a useful distinction.