From: Simen Edvardsen Date: 2006-08-10T20:38:42+09:00 Subject: Re: Language chatter On 8/10/06, Francis Cianfrocca wrote: > This thread has probably gone on long enough ;-) Probably. > > I find it very revealing that you see the primary (borrowable) value in > functional languages as coming primarily from *syntactic* elements. > Again I may be misreading you, but you can get syntactic innovations > from anywhere. The thing that really distinguishes functional programs > is that you can reason mathematically (and one hopes, automatically) > about their correctness. Rather than being stuck with the whole sorry > round of unit-test/debug/regress/repeat that we use with Ruby and every > other non-functional language. Apart from the reference to Ada/Diana (a > sub-language with a rigorous formal semantics), I haven't heard anyone > on this thread try to relate this benefit of functional languages to > non-functional ones. > You can reason mathematically about the correctness of a pure FP program, but not about the time and effort it took to create it. I see productivity and maintainability as better arguments for using functional languages. > To answer someone else, the ability to automatically process programs is > why I'm interested in mini-languages (DSLs) written in Ruby that are > non-Turing complete, because they may be decidable, if designed > properly. Any internal DSL has access to the whole of the parent language, and so it can not be non-Turing complete as long as the parent language is. Restricting access to features of the parent language to get this automatical correctness tester or whatever to work seems plain silly. Besides, there's no mathematical notation for a programmers intent, and probably never will be, so a processor will probably never be able to prove that a program does what its author intended to do. > If people see the distinctions between "functional" and "non-functional" > languages purely in syntactic terms, then this whole discussion is > really no deeper than yet another Ruby vs. Python debate. True. -- - Simen