Part 4. Characters and Symbols ******************************* It is unfortunate we have to deal with ASCII character set, since it lacks many symbols.
In Felix we have magic associations: fun add: int * int -> int; val x = 1 + 2; // + is add .. New infix operators can be defined by: #infix 10 "$%^" fname which defines a left associative infix operator at precedence level 10 (whats that??) and an associated function. The actual operator can be a keyword of any sequence of special characters. Felix uses a longest match algorithm to lex sequences of special characters. To be modern, we might consider Unicode symbols. However, most of them are actually useless ;( Even the APL subset isn't really that good. For maths, TeX, LaTeX and AMSTeX provide better symbol sets. For example we could write: \cap \cup for setwise intersection and union: the names suggest the shapes not the functionality. These could be typeset as the actual TeX symbols. I think it is important to note that 'recognizable' symbols will be domain specific. A mathematician will demand different symbols to an economist. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language