// #include //#include struct tm { int x; }; forall (T*) T* alloc(); int main () { // // // C, library // // void * malloc( size_t ); // // C, user // struct tm * el1 = (struct tm * ) malloc( sizeof(struct tm) ); // struct tm * ar1 = (struct tm * ) malloc( 10 * sizeof(struct tm) ); // // // CFA, library // // forall( T * ) T * alloc(); // // CFA, user // tm * el2 = alloc(); // tm (*ar2)[10] = alloc(); // ar1[5]; // (*ar2)[5]; // tm (&ar3)[10] = *alloc(); tm (&ar3)[10]; &ar3 = alloc(); ar3[5]; }