3 ms·
> 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 functi
by 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.
- qwertyuiop924 10y agoDo you know what % of scheme is fairly functional? Most of it. There are ~19 functions in r5rs that mutate state, if you count IO related functions. I have used maybe half of them, and mostly the IO ones. The rest were for mutating variables, lists, vectors, and strings. Many of those are rarely used. I mean, really, when was the last time you used set-car! or set-string!?
- willtim 10y agoScheme has little to offer out-of-the-box as a basis for Nix. It has no convenient syntax or suitable implementation for extensible records, which is the core data type of Nix.
- qwertyuiop924 10y ago'((extensible-records . being-key-value-maps?)) Alists are fast enough for this, and they ARE k/v maps. And support for them is in rnrs.
- vertex-four 10y agoThey kind of suck syntax-wise though. There's no visual difference between them and any other list.
- qwertyuiop924 10y ago'(this is a list) '((this . is) (an . alist)) Looks pretty distinct to me.
- vertex-four 10y ago'((this . is) (a . list) (of . cons)) '((this . is) (an . alist)) Hey look, my list of cons looks incredibly like an alist... funny that.
- qwertyuiop924 10y agoSo an alist looks like an alist. I'm shocked. and alist is a list of pairs. That's what it is. Semantically, there isn't really another reason to use the format.