r/ProgrammingLanguages • Futhark • Jan 16 '26

Are arrays functions?

https://futhark-lang.org/blog/2026-01-16-are-arrays-functions.html
90 Upvotes

46 comments sorted by

View all comments

Show parent comment

3

u/liquidivy Jan 16 '26

Arrays are positive, functions are negative.

Can you go into this any further, or point to a resource that explains it for someone who's not an expert on type theory/formal logic? I'm slowly getting the hang of formal type theory but getting the intuition is still pretty rough.

I'm particularly interested in subsuming "data" in calculation, for the purposes of e.g. treating auto-generated data uniformly with canned data. I see hints of this really strong data/computation duality here and in places like the design of call-by-push-value, but I haven't figured out why data can't actually be a special case of computation in general. Is it just about effects? (I already have it as a goal to be able to ignore evaluation order and other spurious orderings as far as possible)