Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!qt.cs.utexas.edu!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!ai-lab!zurich.ai.mit.edu!markf From: markf@zurich.ai.mit.edu (Mark Friedman) Newsgroups: comp.lang.misc Subject: Re: scheme [Re: What does an anti-perl look like] Message-ID: Date: 28 Jun 91 14:39:56 GMT References: <4601@optima.cs.arizona.edu> <1991Jun26.223026.13792@watserv1.waterloo.edu> <603@smds.UUCP> Sender: news@ai.mit.edu Reply-To: markf@zurich.ai.mit.edu Organization: M.I.T. Artificial Intelligence Lab. Lines: 51 In-reply-to: rockwell@socrates.umd.edu's message of 28 Jun 91 04:35:37 GMT In article rockwell@socrates.umd.edu (Raul Rockwell) writes: Stephen E. Witham: > Lisp has two features: an internal form for programs, and a > (over:-) simple syntax. I think with an "infix Scheme," having a > well-defined internal form would give you most of the power. > You'd need a "code-constant" or > "internal-form-of-this-quoted-code-fragment" construct, e.g., > > x = quote { > function ( a, b ) { > return a+b; > } > }; > > (That's not a lambda expression, it's a quoted lambda expression.) Why such a complicated expression? Why not just x =: + Because he was responding to someone who was remarking upon the usefulness of lisp code being represented as lists. Stephan was trying to show that you could have some syntax (like 'quote') which when given a code fragment could return a useful internal representation of that code, the same way that, in lisp, you can slap a 'quote' around a piece of code and get a list. He wanted the variable 'x' to be bound to a representation of the code of the procedure, not the procedure itself. Requiring a lambda expression to express an anonymous function seems to me to be one of LISP's flaws, not one of its advantages. What's your alternative? You need some syntax to say that you want a function that takes some number of arguments. Or, put another way, infix notation already has a clear scheme for representing arguments, why not take advantage of it? I won't argue about the usefulness of infix notation, but what has that to do with anonymous functions? -Mark -- Mark Friedman MIT Artificial Intelligence Lab 545 Technology Sq. Cambridge, Ma. 02139 markf@zurich.ai.mit.edu