Arc Forumnew | comments | leaders | submitlogin
1 point by sjs 6308 days ago | link | parent

Using = to test for equality is confusing in an Arc forum. :)

1. This could be added without introducing a new reserved word. I have a git branch on my machine here where < and > return their first argument if the comparison succeeds.

2. Seems handy. I would put the operator before the number to compare just because it reads better, though I realize the op varies the least. The default of testing (is (len lst) 1) seems arbitrary, but I guess (no lst) takes care of the most common length test so maybe it's useful. Also, (is 1 (len lst)) is only 3 chars longer than (length? lst). Personally I like the ? suffix to denote predicate fns but I don't think pg does (or he would use them). For Arc I would suggest (len? ...).

I'm not sure about 3 and 4.

4. It seems backwards to put the (< n (len lst)) case first, no? I would put (< (len lst) n) first, then (is (len lst) n), then (> (len lst) n).