Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Why does everyone hate 'eval'?
Date: Thu, 11 Dec 2008 18:36:03 +0000 (UTC)
Organization: Atlantic Inertial Systems
Lines: 28
Message-ID: <ghrmij$a0h$1@fred.mathworks.com>
References: <ghrlim$oqo$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1229020563 10257 172.30.248.35 (11 Dec 2008 18:36:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 11 Dec 2008 18:36:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1405925
Xref: news.mathworks.com comp.soft-sys.matlab:506389

"Johan Carlson" <Johan.E.Carlson@gmail.com> wrote in message <ghrlim$oqo$1@fred.mathworks.com>...
> Hey guys!
> 
> I've been running into comments like "NO, NO, NO, WHATEVER YOU DO,  DO NOT USE EVAL!!!!' in various posts during the past few weeks.
> 
> OK, I can see that over-use of eval would create, cool-looking, but totally unreadable and inefficient code.
> 
> But, are there any other reasons to hate eval this much? 
> 
> Good coding style on the one hand, I still see the occasional use of eval as highly motivated.
> 
> Comments?
> 
> /JC

motivated => provided with an incentive
?!?!?

http://www.mathworks.com/support/tech-notes/1100/1103.html

"it is easier to use them than to search for a more elegant solution"
aka learning the language

"These functions can create bugs which are difficult to reproduce and nearly impossible to eliminate."

I've never even attempted to use it myself, but it seems it would create unreadable, undebuggable code.  If you can't read it and can't fix it what good is it?

~Adam