Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!postnews.google.com!57g2000hsv.googlegroups.com!not-for-mail
From:  "G.A.M." <x0Zero@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: ML Classes - What is the right way to construct classes?
Date: Tue, 18 Sep 2007 16:41:23 -0000
Organization: http://groups.google.com
Lines: 38
Message-ID: <1190133683.090984.194360@57g2000hsv.googlegroups.com>
References: <1190044074.433443.295080@n39g2000hsh.googlegroups.com>
NNTP-Posting-Host: 24.129.101.179
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1190133683 6867 127.0.0.1 (18 Sep 2007 16:41:23 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 18 Sep 2007 16:41:23 +0000 (UTC)
In-Reply-To: <fcmgb4$7u2$1@fred.mathworks.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: 57g2000hsv.googlegroups.com; posting-host=24.129.101.179;
Xref: news.mathworks.com comp.soft-sys.matlab:429149



On Sep 17, 2:17 pm, "per isakson" <poi.nos...@bimDOTkthDOT.se> wrote:
>  "G.A.M." <x0Z...@gmail.com> wrote in message
> > I wrote my first class in Matlab recently.
>
> Have you thought of using "closures" (nested functions
> together with function handles) instead? Assignments with
> Matlab objects are "by value".
> <snip>
>
> > But the program works correctly and I don't want to
> > break it as we refactor it.
>
> MUNIT (free download) athttp://xtargets.comis the best I
> have found.
> <snip>
>
> / per

per- thanks for the link. This looks like one of the most interesting
sites I have seen in my short time using ML. I am particularly
intrigued by this statement:

"Fairly soon after I discovered nested functions I realized the dual
between objects and NF's. An object is really just a set of nested
functions over a common scope."

I'm hoping that this statement holds the key to my original question.
I can see a lot of possibilities in this idea.

I'll take your advice and check out MUNIT. I also believe MTemplates
may be very useful in my quest to write robust ML code.

Furthermore, the site has a tutorial on "Advanced Layout Management
With Handle Graphics" which answers my other question about docking my
own windows.

This is a pretty interesting post too: http://xtargets.com/snippets/posts/show/71