Print

Print


Just a point on this highly debated problem.

There are in fact 2 different and complementary problems to solve:


1) The ability to write, once for sall, a package for Lists (or any other
structure) of one (but ANY) type T of objects, with the lowest adaptation cost
for a specific type t.

	This first problem is solved by GENERICITY in the Ada sense (see for
instance my own Fortran 90/95 Data Structures book).


2) For a given list (be it generic or not), the ability to mix different kind
of objects in it.

	Solutions are:
	2.1) use of TRANSFER function, as exposed through the Mail discussion.
	2.2) simulate a variant derived type for the above type T (the "generiic
		parameter" of the List Data Structure).


Note that both problems make sense only in a typed language.
	In a typeless language such as Lisp, you simply define a List structure,
and objects in it are of any kind.

Hope this helps to "resume" (RESUMER in french) the discussion?...
 ---------------------------------------------------------
 *   Patrice LIGNELET             tel : 01 40 27 22 58   *
 *   MEl: [log in to unmask]                 23 83   *
 *   Sur la Toile mondiale (le Ouaibe):                  *
 *   	http://www2.cnam.fr/~lignelet                    *
 *                                                       *
 *   Conservatoire National des Arts et Metiers          *
 *   Departement d'informatique   fax : 01 40 27 23 77   *
 *   292, rue Saint Martin                               (\
 *   75141 PARIS CEDEX 03                                ( \
 =========================================================) ) />
                                                    / )  / //))/
                                                    \ \_/ /////
                                                     \       /
                                                      \_    /
                                                        |   |
                                                        |   |
                                                        -----
                                                        -----


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%