[Coco] Code Packing
Steven Hirsch
snhirsch at gmail.com
Tue Nov 13 07:23:59 EST 2012
On Mon, 12 Nov 2012, John Donaldson wrote:
> Subject is a Class and Associates is a Model. The "a" becomes a "var" thus can
> be a string, int, boolean, etc.
I'm still not sure what point you were trying to make, but no biggee.
And, "model"? Not familiar with that term. Is that code in Java?
I spend my days in the engineering design automation world where
"easy" things are Perl or Tcl and "hard" things are written in C++.
> ________________________________
> 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.
--
More information about the Coco
mailing list