From: Kevin Howe Date: 2005-02-07T07:05:12+09:00 Subject: Re: [ANN] LXL (Like Excel) 0.1.0 - A mini-language that mimics Microsoft Excel formulas. > Huh. So you've got another example of a domain-specific language, and > somebody else using Ruby might've chosen to use in-Ruby features to > allow employees to write business rules. Maybe something like: > > add_rule { > notify_supervisor if @expense.office == 'HQ' and @budget.remaining < > 500 > } A couple of issues with that (in my particular situation) 1) Formulas are modified via the web, and I don't put web input anywhere near an eval statement if I can help it. The parser enforces the syntax and catches anything unusual. 2) Even the example code above isn't simple enough. The users are not programmers and aren't looking to be. They wanted something that looked as much like plain english as possible, something that reads more like a note than like a program. To them using == for "equals" is strange, as are symbols like {} and @. > Which, on some aesthetic level, might be better than representing it > with Excel's function syntax, but then maybe that's moot if your > coworkers are familiar with Excel. It never ceases to amaze me how > people can become power users of complex software like Excel or > FileMaker, but some of them get quite flummoxed when they're presented > with similar concepts expressed with different syntax. Maybe that's the > difference between a programmer and a power user. > Anyway, not meaning to criticize your decision; I probably would've > done the same thing in your situation. I just find it pretty > interesting. It's almost like it might've better if your coworkers had > been trained in Ruby to start, instead of Excel. Also makes me think > about how Ruby could take over the world if it had products like Excel > or FileMaker that used Ruby as their native scripting language ... If only ;)