From: "M. Edward (Ed) Borasky" Date: 2006-08-09T00:53:49+09:00 Subject: Re: Language chatter Francis Cianfrocca wrote: > I'm glad you enjoyed the trip down memory lane ;-). I gave up on > functional programming over a dozen years ago, for two reasons: first, I > learned the hard way that writing really good compilers for lambda-based > languages requires a huge amount of mathematical knowledge, and mine > doesn't go beyond partial diffeqs. Ah, but you can *buy* or download for free really good compilers for functional languages. See the conference announcement I posted a couple of days ago. Maybe you'd even like to come visit the City of Roses? :) > To your point about regexes: remember that they are level-0 languages, > whereas most programming languages (including useful DSLs) are level-1 > languages (context-free grammars). AFAIK, a language that generates > expressions that can be reduced to NFAs can not be Turing-complete, but > correct me if I'm wrong on that. > Right ... I don't know who first made the point about the tradeoff between a language's expressive power and the ability to reason about programs in that language -- level 0 languages have the least expressive power and are easiest to reason about. However, I first saw it elegantly expressed in James Petersen's book on Petri nets. I don't have it here, but I can dig it up. > With DSLs, I'm thinking about tools for programmers, not for > non-programmers. (Although there is a very interesting class of > highly-successful mini-languages for non-programmers, like MS Office > macros.) My point about "tooling" was in regard to automatic programs > that can reason about other programs. 1. MS Office itself is a useful doman-specific language for non-programmers. I haven't found VBA usable by non-programmers, however. 2. Regarding "tooling" -- if programmers are willing to restrict themselves to constructs that can be tooled, of course. They tend not to be willing to use functional languages, they tend not to be willing to declare types of variables, and they tend to balk at *any* restriction on their ability to shoot themselves and their customers in the foot. :) But of course, the Rails folks rediscovered all of this -- the power that comes from restricting some freedoms. Maybe the Python motto -- "There's only one way to do it" is the right thing after all. > DSLs and other mini-languages are > far easier to write workbenches and IDEs for, which I think is really > interesting and potentially a huge productivity boost. And again, it's > the reduction from full Turing-completeness that may be the secret > sauce. I wish I could prove that, but I've already told you that I'm no > mathematician, so it's a hunch at best. It's an obvious conclusion -- I'll dig up the Petersen reference. :)