Robert Klemme <bob.news / gmx.net> wrote:
> "Martin DeMello" <martindemello / yahoo.com> schrieb im Newsbeitrag
> >
> > Actually, when you're trying to implement domain-specific languages atop
> > ruby, the operators often have a well-defined meaning; it just comes
> > from the domain rather than the larger body of 'programming languages'.
> > For instance, it might be nice to define a financial maths class with
> > $12 creating a money amount literal (what, no prefix operators? :)). It
> > also gives the community a chance to experiment with symbols for common
> > idioms (for instance, a ||+ b for elementwise array addition) - if the
> > symbols aren't intuitive they'll just die a natural death.
> 
> But isn't a sub language integration feature the more appropriate approach
> in this case?

Not sure what you mean by sub language integration; if you're talking
about stuff like Inline::Foo or embedded interpreters, no I prefer the
DSL approach. It lets you coexist with and drop down to ruby a lot more
easily.

martin