Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Reason Matlab has never implemented incrementation operators?
Date: Thu, 1 Oct 2009 05:00:19 +0000 (UTC)
Organization: PhysioSonics Inc
Lines: 6
Message-ID: <ha1d12$log$1@fred.mathworks.com>
References: <20461488.1237405703543.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254373219 22288 172.30.248.37 (1 Oct 2009 05:00:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 1 Oct 2009 05:00:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1129061
Xref: news.mathworks.com comp.soft-sys.matlab:574118


klydefrog <aj00mcgraw@gmail.com> wrote in message <20461488.1237405703543.JavaMail.jakarta@nitrogen.mathforum.org>...
> What is the philosophy or reason behind the Mathworks not finally releasing Matlab with a few incrementation operators? (++, +=, etc)

It would be interesting, given the new object oriented programming capabilities of MATLAB, if it were possible to define operators such as this for your own class.  With that in mind, it would also be nice if one could then implement their own ++ operator for the intrinsic classes.

I'm fairly sure that this is not currently possible, although I think it is possible to overload the operators that are pre-defined in MATLAB, such as + and - (via `plus` and `minus` methods).  If I remember correctly, I've seen examples of this in pre-2008a classes, but have never tried it myself.