« first day (948 days earlier)      last day (690 days later) » 

12:18 PM
thoughts on this syntax for Trequel?
EVERY <name> FROM <expr> WHERE <predicate> - A list of every item in <expr> for which <predicate> returns true. The expression in <predicate> can access the item being checked as <name>.

<name> OF <expr> [WHERE <name> IS <expr> [AND <name> IS <expr> [AND...]]] - Call a function or access a property of an object.

<expr> LIKE <type> - Cast the return value of <expr> to <type>.

DO <code> WHERE <name> IS <expr> [AND <name> IS <expr> [AND...]] DONE - Run <code> with the result of <expr> available as <name>
 
 
9 hours later…
8:49 PM
@Ginger I like the overall idea. There's a few specifics I would suggest changing.
LIKE in SQL is a pattern-matching comparison, so I don't like using it for typecasting; how about AS?
WHERE is being used for two different things--introducing a filtering predicate, and binding local variables. Might be confusing.
The difference between WHILE ... DO and DO ... WHILE wasn't immediately obvious to me. Looking at it again, I guess do-while is "always do it at least once and then repeat as long as the condition is true"? Not sure how to make that less confusing.
I prefer FOR ... IN over FOR ... OF, but that's my Python showing.
 

« first day (948 days earlier)      last day (690 days later) »