How About Agregate Formation and Return?

mat at hou5d.UUCP mat at hou5d.UUCP
Fri Nov 4 15:05:25 AEST 1983


Well, we keep talking about blue-sky additions to C.  I have two favorites
of my own.  They are structure aggregation and disaggregation.

	struct x
	{
		int	depth;
		int	bucket;
		char	*tag;
		struct x	*brother;
	};

	struct x x_obj, x_funct();

	...


	/*
	 * Agreggation
	 */

	x_obj = {	depth: 2,	bucket: alpha,
			tag: x_obj2.tag,	brother: &x_obj2
		};

	/*
	 * Disaggregation
	 */
	{	depth: d,	bucket: buck,
		tag: ; /* discard */ brother: ; /* ditto */
	} = x_funct();

I cannot take credit for the idea of disaggregation.  I first saw it in SETL,
which is a set-symbology language for rapid prototyping developed by Jack
Schwartz of NYU/Courant.


						Mark Terribile
						hou5d!mat



More information about the Comp.lang.c mailing list