Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: conditional operator
Date: Tue, 19 Mar 2013 19:20:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 7
Message-ID: <kiadpj$jd2$1@newscl01ah.mathworks.com>
References: <ef55682.-1@webcrossing.raydaftYaTP> <4635e28a$0$12844$426a34cc@news.free.fr> <f14sdd$ns2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1363720819 19874 172.30.248.37 (19 Mar 2013 19:20:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 19 Mar 2013 19:20:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2460068
Xref: news.mathworks.com comp.soft-sys.matlab:791532

"Steven Lord" <slord@mathworks.com> wrote in message
 > MATLAB does not have the ternary ?: operator, but we do have a request in 
> the enhancement database for this.

How's this coming?

Since short-circuit evaluation (http://en.wikipedia.org/wiki/Short-circuit_evaluation) is a key part of the ternary operator's usefulness, it can only be efficiently implemented at the language level.  We users can't do it for ourselves.