[postmodern-devel] Binary and unary operators
Ivan Boldyrev
lispnik at gmail.com
Sun Jan 6 17:03:00 UTC 2008
1. You are missing such operators like || and && (former is string
concatenation, latter is tests overlapping geometric objects).
There are also
a. math: !, !!, #, >>, <<.
b. geometric: ##, @@, @-@, ~=, <->, &<, &>, <<|, |>>, &<|, |&>,
<^, >^, ?#, ?|, ?-|, ?||, @>, <@.
c. network: <<=, >>=.
?| is both binary and unary operator, ! is postfix (but is
equivalent to prefix !!, so you may define :! that expands to prefix
!! or just :!! that expands to !!).
There are also another operators like @, but they have
functions-substitutions (@ x <=> abs(x)).
psql's command \do (describe operators) also lists other operators.
2. As PSQL allows defining own operators, I think it worth exporting
s-sql::def-infix-ops or creating some more flexible user macro (one
might prefer to use :concat instead of :\|\|).
With such facility you don't need to define such rare-used operators
like @-@ and ?-|, allowing user to define them.
--
Ivan Boldyrev
Violets are red
Roses are blue
It's amazing what DNA splicing can do.
More information about the postmodern-devel
mailing list