[Coco] Code Packing

Steven Hirsch snhirsch at gmail.com
Sat Nov 10 08:34:16 EST 2012


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