metaclass: (Default)
metaclass ([personal profile] metaclass) wrote2009-08-15 01:19 pm

DSL in Ruby

Creating DSLs with Ruby

Пишут, как они пришли от самодельного парсера для DSL к DSL внутри Ruby:

Next, for a short period, we implemented the DSL in XML. This removed the need for us to write our own parser, as XML is universally understood, but it contained too much noise and obscured the contents of the file. Our engineers found it too difficult to mentally task-switch between thinking about the meaning of the stackup and mentally parsing XML. For me, the lesson learned was that XML is not to be read by humans and probably a bad choice for a DSL, regardless of the parsing benefits.

Вот же, блин, жопа. У меня XML-based DSL есть во всех проектах. Кое-где это нормально проходит, простейшие описания хранить, но в одном проекте это увело оный проект в дебри к вшам желтым, вшам красным, жабам и червям.

[identity profile] clayrat.livejournal.com 2009-08-17 08:54 am (UTC)(link)
Про этот xml по-моему изначально было ясно, что хуита.