From: Alexander Schofield Date: 2002-02-20T11:58:12+09:00 Subject: Re: Operator overloading and multiple arguments Phil Tomson wrote: > What are S-Exps? Sorry, S-expressions. Basically any code enclosed in parenthesis: (+ x 1) is an S-exp, so is any expression that contains it ad infinitum. The greatest feature of Lisp and also the main reason it is hated by many. In a nutshell S-exps are powerful because they make code a data structure (lists) that can be manipulated at runtime with macros. We're not talking preprocessor macros here, these are literally able to manipulate the parse tree. Macro's are also very useful for doing things like generating optimal functions that can be compiled. > Actually, Ruby is working out quite well for this so far. I couldn't do > it without closures (procs), though Lisp has those too (so does Perl, but > it would look pretty ugly). With Perl that goes without saying. In Lisp you could define a setf expansion (assignment), and operator precedence is not an issue (parenthesis are the only precedence-- unless you were going to do something insane like write something analagous to the loop macro, but for your system). The result could be some very good-looking Lisp code, by which I mean good-looking by Lisp standards. -- Alexander Schofield