Talk:Forward difference: Difference between revisions

m
no edit summary
mNo edit summary
Line 27:
:Of course, this is entirely subjective: it depends on the way you think about the problem. So you may think of "forward differences" exactly as "subtracting the behead from the curtail". In fact, I think some of the other languages calculate their results exactly that way, so the original solution may serve better as a "direct translation".
 
:Regarding verbal vs adverbal: I don't think the differences are minor (though they may be subtle). The primary argument for a verb solution runs like this: we have two noun inputs and want to produce a noun output, which is the very definition of a dyadic verb. All the arguments are supplied at "run time" not "definition time", and no new verbs are produced, so the adverb does not benefit us. Yet it costs us plenty: adverbs are hard to use like verbs. For example, how would you write the equivalent of <tt>+/@(2&(-/\))</tt> (the sum of the forward differences) without rewriting your the adverb as a verb? You'd have to go through convolutions like <tt>((}.-}:)^:)(+/@)</tt>.
 
:A secondary (but still important) difference is generality: Verbal solutions can be easily extended with rank, but it's difficult to slice-and-dice arguments to adverbs. For example, how would you recreate this result using the adverb solution?
Anonymous user