Re: eval use ?
- From: grue@xxxxxxx (Timofei Shatrov)
- Date: Mon, 27 Feb 2006 07:15:07 GMT
On Sun, 26 Feb 2006 03:06:51 +0100, Majorinc, Kazimir <false@xxxxxxxxx>
tried to confuse everyone with this message:
In article <1140929811.970351.270010
@e56g2000cwe.googlegroups.com>, amit_h123@xxxxxxxxxxx says...
hello,
i am just tryin to learn lisp from robert wilensky's common lispcraft.
But i am all stuck at the eval function use ..can somebody help me out
what does exactly eval is used for specially can you give me some
examples of complex code where it is being use.. coz its like i can get
the simpler examples but not gettin it utility for complex thinkgs
where it can be used..
Just two examples from my practice - imagine that you write
screen saver, and you want to write program that calculate and
draw some cute 3d objects on the base of random ... formula.
Now, the problem - how to represent formulas? The simplest
answer is to represent them as expressions in the programming
language and evaluate as needed.
Or, second example - imagine that you want to write program
that process Boolean formulas. How will you represent that
formula? It is best to represent them as Lisp expression and in
that case, from time to time, it will be very handy to simply
EVALuate such formula.
It's much better to use FUNCALL or APPLY. In such examples EVAL is
totally uncalled for. In the 3D screensaver example it also creates a
security hole of gigantic proportions by allowing it to execute
arbitrary code.
--
|WAR HAS NEVER SOLVED ANYTHING|,----- Timofei Shatrov aka Grue---------.
|(except for ending slavery, ||mail: grue at mail.ru ================ |
| fascism and communism) ||============= http://grue3.tripod.com |
|...and Saddam's dictatorship |`----------------------------------[4*72]
.
- Follow-Ups:
- Re: eval use ?
- From: Majorinc , Kazimir
- Re: eval use ?
- References:
- eval use ?
- From: newbie
- Re: eval use ?
- From: Majorinc , Kazimir
- eval use ?
- Prev by Date: Re: lisp idiom for processing each line in a file?
- Next by Date: Re: eval use ?
- Previous by thread: Re: eval use ?
- Next by thread: Re: eval use ?
- Index(es):
Relevant Pages
|
|