2 ms·
There is something wrong with our general approach to programming. Majority of "real" work is writing total functions (in the sense, non-recursive). Yet, we ver
by js8 9y ago
There is something wrong with our general approach to programming. Majority of "real" work is writing total functions (in the sense, non-recursive). Yet, we very much insist on using Turing-complete languages everywhere.
I suspect we would be better off if we used total domain specific languages for the majority of the work (data transformations) and TC languages only sparsely, where we cannot avoid recursion.
This is somewhat what you do when you write SQL, but SQL is an OLD language and it doesn't compose well with other things.
This approach is exemplified by for example Facebook's Haxl, which is a functional domain specific language for filtering content. So you write the domain code in a specific language, which is easily transformed/compiled.
(Actually your TC and your DS language don't need to be different syntactically, they can be both based on a common functional language.)
Interestingly, the interviews are very much based on TC language notions.