3 ms·
Can you expand on this some? I am not super familiar with the array-based group of languages, but so was under the impression that implementing S,K, and I combi
by throwaway17_17 3y ago
Can you expand on this some? I am not super familiar with the array-based group of languages, but so was under the impression that implementing S,K, and I combinators was possible. Is it just the restriction of array arguments or is it something else that inhibits the languages?
- rak1507 3y agoYeah, you can implement them like you could in anything - it varies per language but the lack of true higher order functions (anything except K) and lazy evaluation (all) means that there's not really an 'elegant' way for anything more than 1 term deep. That's not to say that the 'combinators' in array languages are bad, they're very useful and a nice form of function composition that I wish most other languages had, but they're not really a true combinator in the lambda calculus sense. You can't pass the array language 'combinators' to other combinators.
- martinsmit 3y agoBQN[1] has higher order functions. Of the array languages I've used, it's by far my favourite. That said, I mostly solve small problems for fun in them. [1] https://mlochbaum.github.io/BQN/index.html https://mlochbaum.github.io/BQN/index.html
- rak1507 3y agoYeah BQN sort of has higher order functions but it still distinguishes between functions and data, so I don't think it would be that possible/easy to use combinatory logic style combinators. I haven't used BQN much though, so I could be wrong.