Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good point. Hey, aren't Lisp s-expressions just a less powerful form of XML nested structures? I think Lisp should be re-written in XML. So this:

   (defun factorial (n)
      (return (if (< n 2) 1
                  (factorial (-1 n)))))
Would become:

   <!DOCTYPE xmllisp>
   <program>
      <function name="factorial">
         <parameters>n</parameters>
         <return>
            <if><condition>n &lt 2</condition>
               <iftrue>1</iftrue>
               <iffalse>
                  <functionCall name="factorial">n - 1</functionCall>
               </iffalse>
            </if>
         </return>
      </function>
   </program>
Which I think we can all agree makes much more sense.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: