Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!llnews!53ab2750!not-for-mail
From: Peter Boettcher <boettcher@ll.mit.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: eval, feval, global
References: <fsebf0$43u$1@fred.mathworks.com>
Message-ID: <muyy785jgak.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)
Cancel-Lock: sha1:Qc6/yJnfmh6eO5brTa6MAcQkT9s=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 15
Date: Wed, 26 Mar 2008 18:01:39 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1206568314 155.34.163.114 (Wed, 26 Mar 2008 17:51:54 EDT)
NNTP-Posting-Date: Wed, 26 Mar 2008 17:51:54 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:459376


"Yuri Geshelin" <geshelin@hotmail.com> writes:

> 1) Why are eval, feval considered not elegant and banned in
> programming contests? I often use eval, why should a good programmer
> stay away from it?

It is hard for MATLAB to accelerate (slow) and it creates hard-to-read
code.  There is usually an alternative with dynamic field names of
structures, arrays, cell arrays, etc.

If there's a code pattern you think you need eval for, post it here, and
see if we can help.


-Peter