From: Gavin Sinclair Date: 2003-09-09T17:13:09+09:00 Subject: Re: ANN: MetaTags 1.0 > On Tue, Sep 09, 2003 at 01:25:58PM +0900, Gavin Sinclair wrote: >> > Hi, >> > >> > In message "Re: ANN: MetaTags 1.0" >> > on 03/09/09, Hal Fulton writes: >> > >> > |Much easier than I thought. I'll bet there are some gotchas, >> > |though. >> > | >> > |Matz?? >> > >> > Yes? It is hard for me to merge this, because >> > >> > * it's no better than e.g. "y %{foo: bar}". >> > * it's against my policy of "syntax should be stable". >> > >> > I agree with usefulness of user-defined literals, and this is much >> disciplined than generic reader macros, but still we need to discuss >> pros and cons. >> > >> > matz. >> >> A thought occurred to me. If %y{foo: bar} is seen as desirable as a >> short and simple way of declaring a YAML literal, what about this >> instead? >> >> YAML{foo: bar} > > def Y(txt) > YAML.load txt > end > > Y %{bla: foo} > => {"bla"=>"foo"} > > OTOH this might scare people who think "... combinator" whenever they > see Y. > Yes, on seeing Nobu's reply and Dave's independent contribution, I definitely think YAML %{ as many lines as you like } is the way to go. It's orthogonal, which is my favourite word. Note: not Y %{...}, but YAML %{...}. Y is an unjustified shortcut, IMO. Gavin (who loves Ruby's quoting mechanisms and hates writing SQL queries in Java)