4 ms·
A purely functional subset of Scheme, honestly, is different enough from most lisps that it's a new language on its own. If you're learning a new language, a ne
by vertex-four 10y ago
A purely functional subset of Scheme, honestly, is different enough from most lisps that it's a new language on its own. If you're learning a new language, a new syntax isn't very hard. And there's not a terrible amount of people who think S-expressions are an inherently good syntax.
- qwertyuiop924 10y ago>A purely functional subset of Scheme, honestly, is different enough from most lisps that it's a new language on its own. No, it's not. It's a cut-down Scheme: Most of your scheme knowledge would apply directly, or indirectly. Besides, even if it was a different language, it's a pre-existing one: DSSSL is pretty much this. >If you're learning a new language, a new syntax isn't very hard. Yes, but for me, the choice is learning a new language that has no other applications, save package managment, and using a subset of a language I already know. >And there's not a terrible amount of people who think S-expressions are an inherently good syntax I said from my perspective. I'm a schemer, so I'm already on board with sexprs.
- 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.