Bill,

Actually, the original Unix shell was written in this fashion by Steve
Bourne at Bell Labs.

In those days, people thought the ability to do this sort of thing was
one of the advantages of the C preprocessor. It didn't take too long
for them to change their minds. :-)

At Harvard back in the 70s, we had a language called EL1 (Extensible
Language 1 - primarily developed by Ben Wegbreit and Tom Cheatham)
that had a Algol like syntax on top and was really all s-expressions
underneath. The thing that was cool about this was a super-macro
facility called "rewrite rules" that let you really change the syntax
of the language.

You could do some nice things with it, but the users ended up breaking
into two camps: the ones who really understood it just wished that the
Algol stuff would get out of the way and let them see the Lisp (which
you could in the debugger) and the others never were really able to
leverage the power of the macros because they didn't really see what
was going on.

Tom

On Nov 28, 6:34 pm, ".Bill Smith" <[EMAIL PROTECTED]> wrote:
> I can understand how that might be attractive to someone accustomed to
> a language that uses infix operators (as opposed to a Lisp), but I
> wonder how many people with a few weeks of Lisp under their belt would
> find the infix function worth the trouble.
>
> This reminds me of when we introduced the C language at Schlumberger.
> There was a fellow who was accustomed using Pascal.  Rather than
> adjust to C syntax, he wrote a set of macros that made C look like
> Pascal.
>
> Bill
>
> On Nov 28, 5:54 pm, Dmitri <[EMAIL PROTECTED]> wrote:
>
> > First of I'd like to say that I find Clojure to be an excellent
> > language, however I find the lack of infix operators makes reading
> > equations somewhat unnatural, eg:
>
> > (+ (- (* x x) (* y y)) a)
>
> > I ended up writing a simple function to handle infix notation
>
> > (defn infix [arg1 func arg2 & args]
> >     (let [result (func arg1 arg2)]
> >         (if (= args nil) result (recur result (first args) (second
> > args) (rrest args)))))
>
> > using that I find makes the code more readable:
>
> > (infix (infix x * x) - (infix y * y) + a)
>
> > I was wondering if there is a more elegant way to do this, and if it
> > could be added as a standard or contrib function.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to