From: Leslie Viljoen Date: 2006-10-03T21:19:34+09:00 Subject: Re: "Succinctness is Power", by Paul Graham On 10/2/06, Zed A. Shaw wrote: > On Mon, 2 Oct 2006 04:32:49 +0900 > "Wilson Bilkovich" wrote: > > > On 10/1/06, M. Edward (Ed) Borasky wrote: > > > Martin Coxall wrote: > > > > In any case, there's a question about about to what extent you *should* > > > > host DSLs internally. It's my feeling that if you want to inline a DSL > > > > in your code, make sure that language is still syntactically > > > > recognizably a Ruby. Ruby on Rails is a classic example. > > > > > > The problem I have with the two best-known Ruby DSLs, Rails and Rake, is > > > the somewhat non-intuitive mix of words that don't begin with colons, > > > and symbols, which do. And Rails requires YAML in some places that are > > > jarring to the reader. Why is the database connection description file > > > in YAML and not in "a Ruby"? > > > > > > > DHH mentioned at Canada on Rails (if I recall) that having > > database.yml instead of database.rb was basically a beginner's > > mistake, and that distant-future plans include turning that into a > > Ruby script. > > So, at least the rails core team agrees with you. Heh. > > > > Oh great, an ever modifiable ruby DSL that we'll never be able to write a nice configuration > tool against. What happened to embrace the constraint? Perhaps you could get the best of both worlds by "constraining" the developers to writing a simple API with every new config file "format", so that code could read and write it. Or otherwise you could have: include database.rb include custom-that-modifies-some-settings.rb ...which can override whatever database.rb does. But I agree that YAML is better for this. Les