Path: news.mathworks.com!not-for-mail
From: "Matthew Simoneau" <matthew@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: eval, feval, global
Date: Wed, 26 Mar 2008 21:42:01 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 19
Message-ID: <fsefv9$6vb$1@fred.mathworks.com>
References: <fsebf0$43u$1@fred.mathworks.com>
Reply-To: "Matthew Simoneau" <matthew@mathworks.com>
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 1206567721 7147 172.30.248.35 (26 Mar 2008 21:42:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 26 Mar 2008 21:42:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 25640
Xref: news.mathworks.com comp.soft-sys.matlab:459369


Hi Yuri,

EVAL should rarely be used.  Most of the time, there's a
much more efficient way to accomplish the same thing.  Here
are some notes on this subject:

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

The use of global variables is debatable, but there's
nothing at all wrong with FEVAL.  In fact, there are some
nice programming patterns that you can implement no other way.

All that being said, the reason these are banned from the
contest has nothing to do with good programming practices. 
These constructs are banned to increase the security in the
environment which automatically scores the entries.

Thanks for your interest,
Matthew