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$>
References: <ghrlim$oqo$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1229020563 10257 (11 Dec 2008 18:36:03 GMT)
NNTP-Posting-Date: Thu, 11 Dec 2008 18:36:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1405925
Xref: comp.soft-sys.matlab:506389

"Johan Carlson" <> wrote in message <ghrlim$oqo$>...
> 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

"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?