From: "Sean O'Dell" Date: 2003-09-10T02:05:45+09:00 Subject: Re: ANN: MetaTags 1.0 Gavin Sinclair wrote: >>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. I might be naive on this subject, but what's wrong with just using HERE documents? You can send them to any method you want. They're already 100% flexible, as far as I know, and perfectly readable. What do we gain by adding special %{} syntax to the language? Sean O'Dell