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

Symbols are not treated more systematically in Mathematica.

QUOTE is a special operator in Lisp that causes the evaluator to return its argument unevaluated.

     (quote a) -> a
     (quote (+ 1 2)) -> (+ 1 2)
     (quote "abc") -> "abc"
Mathematica has a different strategy for computation, one that is based on rewrite rules. Expressions are rewritten until they can't no longer be rewritten.

In Lisp evaluation

    (+ a a)
gives an error if the variable A has no value.

In Mathematica it would be reduced to

   (* 2 a)  ; in Lisp syntax
if A has no value.

But that has little to do with the processing capabilities of Lisp. A function like Take can be written very natural in Lisp - there is NO special mode needed. The function takes data and computes results.

You may want to get out of your Mathematica blub and learn some Lisp. Writing the 'Take' function is a good exercise. Stuff like that are basic exercises in Lisp courses.



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

Search: