Path: utzoo!attcan!uunet!decwrl!claris!apple!metaphor!dowell From: dowell@metaphor.Metaphor.COM (Craig Dowell) Newsgroups: comp.lang.eiffel Subject: Genericity at the underlying system level Keywords: Genericity, ARRAY class, allocate, dyn{get,put} Message-ID: <1614@metaphor.Metaphor.COM> Date: 24 Oct 90 22:05:31 GMT Organization: Metaphor Computer Systems, Mountain View, CA Lines: 18 I'm very new to Eiffel and this newsgroup so forgive me if this is obvious or previously discussed. I've just gotten through Meyer's Object-Oriented Software Construction and it makes a lot of sense. One thing I haven't been able to grasp is how genericity is implemented at the lowest level, though. The following relates to p452 of Extracts from the Eiffel Library: Class ARRAY[T]'s Create procedure calls a C function, allocate. The comments say that allocate reserves an area of n integers. How can this be generic? To be generic wouldn't you reserve an n * (sizeof(T) equivalent) number of bytes and have dynget and dynput index according to the sizeof(T) equivalent. Is there some implementation dependent automagical intervention happening here between Eiffel and C? I guess my real question is where is the Eiffel/C interface defined? -- Craig