[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: validating Lua data
- From: Norman Ramsey <nr@...>
- Date: Sat, 30 Dec 2006 19:48:59 -0500
> Norman Ramsey <nr <at> eecs.harvard.edu> writes:
>
> > But I think the real intellectual work lies in the design
> > of the schema language. How, for example, should I specify...
>
> Keep it simple! You said you wanted something to protect against
> spelling mistakes and such, and the simple "prototype" schema works
> just fine for that.
The trick is to make things as simple as possible, but no simpler.
In my case, if a datum fails to validate, I insist on a helpful error
message. (Remember the infamous 'syntax error' message from the first
C compiler built with yacc? 'The experienced user can usually figure
out the problem'.) My solution provides one (which you may have
missed since it was a MIME attachment).
NR