Arc Forumnew | comments | leaders | submitlogin
1 point by conanite 5546 days ago | link | parent

  [coerce _ 'cons]:(h . tl)
but ssyntax doesn't do this anyway!

I'm not sure I understand your point about abbreviation; in my example isn't the ssyntax an abbreviation for a let form within the function?

The point you make about homogeneity is important - so maybe the example should be rewritten like this:

  (dfn some (testify.test seq)
    (if (alist seq)
        (reclist test:car seq)
        (recstring test:seq seq)))
The dot ssyntax in this case is just what the caller would have to do if the callee expected a pre-testified arg:

  (some testify.ch chars)
So the choice of dot instead of colon might be better for consistency - it looks like it's just inlining existing code.

I like it less this way, personally - it looks like "testify" is somehow part of the param name, whereas with "testify:test" the two parts seem more distinct, that "testify" is something you apply to "test" before proceeding with the function. But maybe that's just subjective.