[Reviving a thread from a couple weeks back] I wrote: > Second, for an example of the practical benefits of the tacit style, > you might be interested in a recent post where I demonstrated that the > syntax of tacit code is subject to algebraic manipulation [1]. Such > manipulation allows us to reason about our programs, which is > certainly a benefit, and can lead to insights, and even > simplifications. All this can be done on a surface level, without > necessarily having to "read" the program; by implication, it means > such simplifications can be automated.
Raul responded: > The sentences used in explicit definitions are subject to > the same algebraic manipulations. True, in the sense that both Lisp and C have macros. I think it's worth exploring the analogy (Lisp macros) : (C macros) :: (Tacit metaprogramming) : (Explicit metaprogramming) . In functional programming circles, the distinction between textual substitution (a-la C macros) and manipulation-of-code-as-structured-data-objects (Lisp macros) is much discussed, usually to emphasize the superiority of the Lisp approach over C-like macros (which are excoriated). The general claim is that having well-understood object (with a documented and analytical structure) to represent "latent code" allows metaprogrammers to understand the role and context of that code in depth, as opposed to relying on incomplete and sometimes-shaky inferences from an opaque string. Furthermore (so the argument goes), having a well-understood code-object allows us to make _substitutions_ with great confidence (formal justification), leading to the much lauded referential transparency of functional programming, aka "equational reasoning". It is this equational reasoning which I was trying to highlight in the series of posts I made earlier in this thread, as a key advantage of tacit programming over other, competing (but oftentimes complementary), styles. With all that said, outside of J, I have limited experience in functional programming, and only a surface understanding advantages it confers (or its advocates claim for it, anyway). I have never programmed in Lisp, Scheme, or Haskell, for example (outside of toying with the languages and their environments). So I'm interested to hear what others think of this Lisp : Tacit :: C : Explicit analogy, or the relative amenability of tacit and explicit code to equational reasoning. -Dan ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
