[Coco] Code Packing
John Donaldson
johnadonaldson at sbcglobal.net
Mon Nov 12 08:30:44 EST 2012
Subject is a Class and Associates is a Model. The "a" becomes a "var" thus can
be a string, int, boolean, etc.
John D.
________________________________
From: Steven Hirsch <snhirsch at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Sat, November 10, 2012 8:34:22 AM
Subject: Re: [Coco] Code Packing
On Fri, 9 Nov 2012, John Donaldson wrote:
> Remember back when we would pack multi-commands into one line of code or when
> doing string processing combine commands into one command just to save enough
> memory to make your program load. Well I am here to tell you that code packing
> is still alive and well. With memory not an issue anymore, I can not
understand
> why anyone would want to do code packing anymore. Here is a routine I found in
> the program that I am working on at work.
>
> Subject.Associates.ForEach( a =>
> {
> var ad = assocs[a.SubjectId];
> a.FirstName = ad.Firstname;
> a.LastName = ad.LastName;
> });
Maybe I'm missing the point, but there's no type specified for "a". If it's not
the same type as "ad" I wouldn't expect to be able to make a full-structure
assignment. Even if it is the same type, I've seen languages that did not
support structure assignment under any circumstances.
--
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list